All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs: fix unbalanced unlock in qgroup_account_snapshot()
@ 2021-06-21  1:21 Naohiro Aota
  2021-06-21  1:33 ` Qu Wenruo
  2021-06-21 16:17 ` David Sterba
  0 siblings, 2 replies; 3+ messages in thread
From: Naohiro Aota @ 2021-06-21  1:21 UTC (permalink / raw)
  To: linux-btrfs; +Cc: David Sterba, Naohiro Aota, stable

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: 2a4d84c11a87 ("btrfs: move delayed ref flushing for qgroup into qgroup helper")
Cc: stable <stable@vger.kernel.org> # 5.12
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
---
 fs/btrfs/transaction.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index f75de9f6c0ad..6aca64cf77dc 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -1476,7 +1476,7 @@ static int qgroup_account_snapshot(struct btrfs_trans_handle *trans,
 	ret = btrfs_run_delayed_refs(trans, (unsigned long)-1);
 	if (ret) {
 		btrfs_abort_transaction(trans, ret);
-		goto out;
+		return ret;
 	}
 
 	/*
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-21 16:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21  1:21 [PATCH] btrfs: fix unbalanced unlock in qgroup_account_snapshot() Naohiro Aota
2021-06-21  1:33 ` Qu Wenruo
2021-06-21 16:17 ` David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.