bcachefs: Refactor dio write code to reinit bch_write_op
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 29 Jun 2020 22:22:06 +0000 (18:22 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:42 +0000 (17:08 -0400)
commit042a1f268e82678ea202390b8a69457aafacd4a0
tree710c979e4565174d0b1ec11cf3732456629481d9
parent64f2a8803ec8d3702a4b5225726f9c1dc685f43a
bcachefs: Refactor dio write code to reinit bch_write_op

This fixes a bug where the BCH_WRITE_SKIP_CLOSURE_PUT was set
incorrectly, causing the completion to be delivered multiple times.
oops.

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