Skip to content

Commit 4436582

Browse files
naotakdave
authored andcommitted
btrfs: fix unbalanced unlock in qgroup_account_snapshot()
qgroup_account_snapshot() is trying to unlock the not taken tree_log_mutex in a error path. Since ret != 0 in this case, we can just return from here. Fixes: 2a4d84c ("btrfs: move delayed ref flushing for qgroup into qgroup helper") CC: stable@vger.kernel.org # 5.12+ Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent da658b5 commit 4436582

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/btrfs/transaction.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1478,7 +1478,7 @@ static int qgroup_account_snapshot(struct btrfs_trans_handle *trans,
14781478
ret = btrfs_run_delayed_refs(trans, (unsigned long)-1);
14791479
if (ret) {
14801480
btrfs_abort_transaction(trans, ret);
1481-
goto out;
1481+
return ret;
14821482
}
14831483

14841484
/*

0 commit comments

Comments
 (0)