Commit c32bd3ad authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix erorr path in bch2_write()

The error path in bch2_write wasn't updated when the end_io callback was
added to bch_write_op.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent b627c7d8
...@@ -1176,7 +1176,12 @@ void bch2_write(struct closure *cl) ...@@ -1176,7 +1176,12 @@ void bch2_write(struct closure *cl)
err: err:
if (!(op->flags & BCH_WRITE_NOPUT_RESERVATION)) if (!(op->flags & BCH_WRITE_NOPUT_RESERVATION))
bch2_disk_reservation_put(c, &op->res); bch2_disk_reservation_put(c, &op->res);
closure_return(cl); if (op->end_io)
op->end_io(op);
if (cl->parent)
closure_return(cl);
else
closure_debug_destroy(cl);
} }
/* Cache promotion on read */ /* Cache promotion on read */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment