Skip to content

Commit 2c4c17f

Browse files
author
Kent Overstreet
committed
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: a850bde ("bcachefs: fsck_err() may now take a btree_trans") Signed-off-by: Kent Overstreet <[email protected]>
1 parent f12410b commit 2c4c17f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/bcachefs/btree_iter.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3282,7 +3282,8 @@ bool bch2_current_has_btree_trans(struct bch_fs *c)
32823282
struct btree_trans *trans;
32833283
bool ret = false;
32843284
list_for_each_entry(trans, &c->btree_trans_list, list)
3285-
if (trans->locking_wait.task == current) {
3285+
if (trans->locking_wait.task == current &&
3286+
trans->locked) {
32863287
ret = true;
32873288
break;
32883289
}

0 commit comments

Comments
 (0)