]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: adjust dirty_metadata_bytes after writeback failure of extent buffer
authorDennis Zhou <dennis@kernel.org>
Fri, 13 Sep 2019 13:54:07 +0000 (14:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2019 11:14:13 +0000 (13:14 +0200)
commit51bae3f5578cbc6016d1852677d5e04b6cbd2970
tree24c081dbbcbf5cd3cf7115ad86802f5040661460
parent3c6b7c79fe965158ef56d34c214926cb65433351
btrfs: adjust dirty_metadata_bytes after writeback failure of extent buffer

commit eb5b64f142504a597d67e2109d603055ff765e52 upstream.

Before, if a eb failed to write out, we would end up triggering a
BUG_ON(). As of f4340622e0226 ("btrfs: extent_io: Move the BUG_ON() in
flush_write_bio() one level up"), we no longer BUG_ON(), so we should
make life consistent and add back the unwritten bytes to
dirty_metadata_bytes.

Fixes: f4340622e022 ("btrfs: extent_io: Move the BUG_ON() in flush_write_bio() one level up")
CC: stable@vger.kernel.org # 5.2+
Reviewed-by: Filipe Manana <fdmanana@kernel.org>
Signed-off-by: Dennis Zhou <dennis@kernel.org>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/extent_io.c