bcachefs: Fix deleted inode check for dirs
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 7 Dec 2023 17:39:13 +0000 (12:39 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Fri, 8 Dec 2023 05:39:56 +0000 (00:39 -0500)
commit6d1980f0af439b5fd49b1bee2220deff6888792e
treebd2d9116e3fabb7ce0f6ad0720384f414857a40c
parente59728883943c6820a0aa413db66a38f2e8c27bd
bcachefs: Fix deleted inode check for dirs

We could delete directories transactionally on rmdir()/unlink(), but we
don't; instead, like with regular files we wait for the VFS to call
evict().

That means that our check for directories in the deleted inodes btree is
wrong - the check should be for non-empty directories.

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