bcachefs: Get ref on c->writes in move.c
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 20 Jun 2022 23:43:35 +0000 (19:43 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:35 +0000 (17:09 -0400)
commit4081ace307c15fb0c15bcc65fce2e3792c1979d9
tree76a5708c59ee703b773dc485c30540c8e9638f6d
parent0337cc7eeed19e81e50414b5199bb65029ca0ed5
bcachefs: Get ref on c->writes in move.c

There's no point reading an extent in order to move it if the write is
going to fail because we're shutting down. This patch changes the move
path so that moving_io now owns a ref on c->writes - as a bonus,
rebalance and copygc will now notice that we're shutting down and exit
quicker.

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