From: Josef Bacik Date: Fri, 12 Mar 2021 20:25:10 +0000 (-0500) Subject: btrfs: handle record_root_in_trans failure in btrfs_record_root_in_trans X-Git-Tag: accepted/tizen/unified/20230118.172025~7052^2~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1409e6cc7461d091b2ef1ad16954972d4ca1c784;p=platform%2Fkernel%2Flinux-rpi.git btrfs: handle record_root_in_trans failure in btrfs_record_root_in_trans record_root_in_trans can fail currently, handle this failure properly. 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 6362549..0b72fe0 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -492,6 +492,7 @@ int btrfs_record_root_in_trans(struct btrfs_trans_handle *trans, struct btrfs_root *root) { struct btrfs_fs_info *fs_info = root->fs_info; + int ret; if (!test_bit(BTRFS_ROOT_SHAREABLE, &root->state)) return 0; @@ -506,10 +507,10 @@ int btrfs_record_root_in_trans(struct btrfs_trans_handle *trans, return 0; mutex_lock(&fs_info->reloc_mutex); - record_root_in_trans(trans, root, 0); + ret = record_root_in_trans(trans, root, 0); mutex_unlock(&fs_info->reloc_mutex); - return 0; + return ret; } static inline int is_transaction_blocked(struct btrfs_transaction *trans)