From 2c4c17fefc49e895e322b3ab0f49d946f384f71b Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Mon, 15 Jul 2024 19:03:17 -0400 Subject: bcachefs: Fix fsck warning about btree_trans not passed to fsck error If a btree_trans is in use it's supposed to be passed to fsck_err so that it can be unlocked if we're waiting on userspace input; but the btree IO paths do call fsck errors where a btree_trans exists on the stack but it's not passed through. But it's ok, because it's unlocked while doing IO. Fixes: a850bde6498b ("bcachefs: fsck_err() may now take a btree_trans") Signed-off-by: Kent Overstreet --- fs/bcachefs/btree_iter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c index 803cc58ff577..36872207f09b 100644 --- a/fs/bcachefs/btree_iter.c +++ b/fs/bcachefs/btree_iter.c @@ -3282,7 +3282,8 @@ bool bch2_current_has_btree_trans(struct bch_fs *c) struct btree_trans *trans; bool ret = false; list_for_each_entry(trans, &c->btree_trans_list, list) - if (trans->locking_wait.task == current) { + if (trans->locking_wait.task == current && + trans->locked) { ret = true; break; } -- cgit v1.2.3