]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: don't clear ret in btrfs_start_dirty_block_groups
authorJosef Bacik <josef@toxicpanda.com>
Wed, 16 Dec 2020 16:22:17 +0000 (11:22 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 18 Jan 2021 15:00:11 +0000 (16:00 +0100)
commit4ea04c479f8c0b4baf6861d459f7769d7dd06d62
tree406929a9427896a1b47fe88526aa6e161d70bb9a
parent7eaf42f1a7e662ea998ab5199b8c519009479920
btrfs: don't clear ret in btrfs_start_dirty_block_groups

If we fail to update a block group item in the loop we'll break, however
we'll do btrfs_run_delayed_refs and lose our error value in ret, and
thus not clean up properly.  Fix this by only running the delayed refs
if there was no failure.

CC: stable@vger.kernel.org # 4.4+
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c