bcachefs: Fix bch2_inode_delete_keys()
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 27 Sep 2023 18:44:56 +0000 (14:44 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:15 +0000 (17:10 -0400)
commit4220666398de7f5127bab5437b5276b3eb155282
treeef6652e6d8e75ad660ce21a2dc43aeb46fe7c636
parent7dcf62c06d11195e8caecd7b2236aa5b07e3ef8c
bcachefs: Fix bch2_inode_delete_keys()

bch2_inode_delete_keys() was using BTREE_ITER_NOT_EXTENTS, on the
assumption that it would never need to split extents.

But that caused a race with extents being split by other threads -
specifically, the data move path. Extents iterators have the iterator
position pointing to the start of the extent, which avoids the race.

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