diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-07 18:39:13 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-08 06:39:56 +0100 |
commit | 6d1980f0af439b5fd49b1bee2220deff6888792e (patch) | |
tree | bd2d9116e3fabb7ce0f6ad0720384f414857a40c /fs/bcachefs/dirent.h | |
parent | bcachefs: rebalance shouldn't attempt to compress unwritten extents (diff) | |
download | linux-6d1980f0af439b5fd49b1bee2220deff6888792e.tar.xz linux-6d1980f0af439b5fd49b1bee2220deff6888792e.zip |
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>
Diffstat (limited to 'fs/bcachefs/dirent.h')
-rw-r--r-- | fs/bcachefs/dirent.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/dirent.h b/fs/bcachefs/dirent.h index cd262bf4d9c5..1e3431990abd 100644 --- a/fs/bcachefs/dirent.h +++ b/fs/bcachefs/dirent.h @@ -64,6 +64,7 @@ u64 bch2_dirent_lookup(struct bch_fs *, subvol_inum, const struct bch_hash_info *, const struct qstr *, subvol_inum *); +int bch2_empty_dir_snapshot(struct btree_trans *, u64, u32); int bch2_empty_dir_trans(struct btree_trans *, subvol_inum); int bch2_readdir(struct bch_fs *, subvol_inum, struct dir_context *); |