projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
791236b
)
bcachefs: Check for directories in deleted inodes btree
author
Kent Overstreet
<kent.overstreet@linux.dev>
Sat, 12 Aug 2023 16:34:47 +0000
(12:34 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:10 +0000
(17:10 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/inode.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/inode.c
b/fs/bcachefs/inode.c
index e0d416553bf0b00ed2bb7eb112c9a2909afc6624..46c4012facb0c297dc36bd251f95139c9d28eff5 100644
(file)
--- a/
fs/bcachefs/inode.c
+++ b/
fs/bcachefs/inode.c
@@
-1048,6
+1048,11
@@
static int may_delete_deleted_inode(struct btree_trans *trans, struct bpos pos)
if (ret)
goto err;
+ if (fsck_err_on(S_ISDIR(inode.bi_mode), c,
+ "directory %llu:%u in deleted_inodes btree",
+ pos.offset, pos.snapshot))
+ goto delete;
+
if (fsck_err_on(!(inode.bi_flags & BCH_INODE_UNLINKED), c,
"non-deleted inode %llu:%u in deleted_inodes btree",
pos.offset, pos.snapshot))