From: Anand Jain Date: Wed, 20 Dec 2017 06:42:26 +0000 (+0800) Subject: btrfs: simplify mutex unlocking code in btrfs_commit_transaction X-Git-Tag: v4.19~1424^2~60 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c1f32b7c1f3be98386f3d268b786660030a44437;p=platform%2Fkernel%2Flinux-rpi.git btrfs: simplify mutex unlocking code in btrfs_commit_transaction No functional change rearrange the mutex_unlock. Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov [ edit subject ] Signed-off-by: David Sterba --- diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 6348573..04f0714 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -2265,16 +2265,13 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans) } ret = write_all_supers(fs_info, 0); - if (ret) { - mutex_unlock(&fs_info->tree_log_mutex); - goto scrub_continue; - } - /* * the super is written, we can safely allow the tree-loggers * to go about their business */ mutex_unlock(&fs_info->tree_log_mutex); + if (ret) + goto scrub_continue; btrfs_finish_extent_commit(trans, fs_info);