bcachefs: Fix 'pointer to invalid device' check
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 13 Aug 2023 17:04:08 +0000 (13:04 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:11 +0000 (17:10 -0400)
commite9679b4a0618b0b55d22ec555bc9c6b2dab39809
tree037488daf9a9ef36a9faf95a72fb5332cdd5cf55
parenta125c0742ccb0b5f2bc84f3f1a8bcee173c1130d
bcachefs: Fix 'pointer to invalid device' check

This fixes the device removal tests, which have been failing at random
due to the fact that when we're running the .key_invalid checks in the
write path the key may actually no longer exist - we might be racing
with the keys being deleted.

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