Skip to contentSkip to conversation

bcachefs: Ensure wo don't return with closure on waitlist

PATCH New Kent Overstreet 1 participant 1 message Jul 17, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bcachefs: Ensure wo don't return with closure on waitlist

things will break wildly if we leave a stack allocated closure on a waitlist

---
 fs/bcachefs/ec.c | 2 ++
 1 file changed, 2 insertions(+)
fs/bcachefs/ec.c +2 -0
index 62dda821247e..8a8c94bd2580 100644
@@ -2060,6 +2060,8 @@ struct ec_stripe_head *bch2_ec_stripe_head_get(struct btree_trans *trans,
 	BUG_ON(trans->restarted);
 	return h;
 err:
+	if (waiting)
+		closure_wake_up(&c->freelist_wait);
 	bch2_ec_stripe_head_put(c, h);
 	return ERR_PTR(ret);
 }
Signature · 1 line
2.50.0