bcachefs: Fix a use after free
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 21 Feb 2022 18:22:11 +0000 (13:22 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:24 +0000 (17:09 -0400)
commitf61816d0fc6091e14b3f4ffce962dc5084a1b6cd
treee544827d27d3e8adba7d490c98d5cbdc240dc0f4
parent12bf93a429c981cf337ce2c27504ec0171157f76
bcachefs: Fix a use after free

In move_read_endio, we were checking if the next pending write has its
read completed - but this can turn after a use after free (and we were
accessing the list without a lock), so instead just better to just
unconditionally do the wakeup.

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