From: Josef Bacik Date: Fri, 12 Mar 2021 20:25:16 +0000 (-0500) Subject: btrfs: handle btrfs_update_reloc_root failure in commit_fs_roots X-Git-Tag: accepted/tizen/unified/20230118.172025~7052^2~62 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2dd8298eb3e90103f3cb36a975aee84bae66f218;p=platform%2Fkernel%2Flinux-rpi.git btrfs: handle btrfs_update_reloc_root failure in commit_fs_roots btrfs_update_reloc_root will will return errors in the future, so handle the error properly in commit_fs_roots. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 4e9e751..62f5195 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1363,7 +1363,9 @@ static noinline int commit_fs_roots(struct btrfs_trans_handle *trans) spin_unlock(&fs_info->fs_roots_radix_lock); btrfs_free_log(trans, root); - btrfs_update_reloc_root(trans, root); + ret2 = btrfs_update_reloc_root(trans, root); + if (ret2) + return ret2; /* see comments in should_cow_block() */ clear_bit(BTRFS_ROOT_FORCE_COW, &root->state);