Skip to contentSkip to conversation

bcachefs: fix macro definition allocate_dropping_locks_errcode

PATCH In review Julian Sun 1 participant 1 message Jul 21, 2024

lore
Share & tools
lore

Julian Sun

author
#0 lore raw

PATCH 2/4 bcachefs: fix macro definition allocate_dropping_locks_errcode

The macro allocate_dropping_locks_errocode accepts a parameter _trans, but it was not used, rather the variable trans was directly used, which may be a local variable inside a function that calls the macros.

---
 fs/bcachefs/btree_iter.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/bcachefs/btree_iter.h +1 -1
index c7725865309c..489004173d28 100644
@@ -847,7 +847,7 @@ __bch2_btree_iter_peek_and_restart(struct btree_trans *trans,
 									\
 	if (bch2_err_matches(_ret, ENOMEM)) {				\
 		_gfp = GFP_KERNEL;					\
-		_ret = drop_locks_do(trans, _do);			\
+		_ret = drop_locks_do(_trans, _do);			\
 	}								\
 	_ret;								\
 })
Signature · 1 line
2.39.2