bcachefs: fsck_inode_rm() shouldn't delete subvols
authorKent Overstreet <kent.overstreet@gmail.com>
Thu, 14 Jul 2022 04:44:09 +0000 (00:44 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:35 +0000 (17:09 -0400)
commite4085b70f21f0e4b578a50a9fd7e84f2a055010f
tree397cc27f23a037711d0cd2723fb8173388e32203
parent597dee1cd67d591cd5aeba184fdb69d0da0ceb78
bcachefs: fsck_inode_rm() shouldn't delete subvols

We should never see an inode marked as unlinked that's a subvolume root
(or a directory) in fsck, but even if we do it's not correct for fsck to
delete the subvolume: subvolumes are owned by dirents, and if we find a
dangling subvolume (not marked as unlinked) we want fsck to reattach it.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/fsck.c