bcachefs: Don't use bch_write_op->cl for delivering completions
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 29 Oct 2022 06:47:33 +0000 (02:47 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:04 +0000 (17:09 -0400)
commit9f311f2166eb969dbe3d69ab24cd78567a30d62c
treea1e041bda4ca7766691ef933d9bfa81f6344bc2d
parentaf171183194f73cca9a2f44ba13907ecc9c761a9
bcachefs: Don't use bch_write_op->cl for delivering completions

We already had op->end_io as an alternative mechanism to op->cl.parent
for delivering write completions; this switches all code paths to using
op->end_io.

Two reasons:
 - op->end_io is more efficient, due to fewer atomic ops, this completes
   the conversion that was originally only done for the direct IO path.
 - We'll be restructing the write path to use a different mechanism for
   punting to process context, refactoring to not use op->cl will make
   that easier.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs-io.c
fs/bcachefs/io.c
fs/bcachefs/move.c