summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2025-10-29 13:20:15 +0100
committerChristian Brauner <brauner@kernel.org>2025-10-31 10:16:23 +0100
commit1e9a9be249ad4cd43ba155ea7e2ed06f15d38eab (patch)
tree2e9f9e3b7560d85bd9ac7e6f502c8a1c0e80b401
parentc9822fad8038870bb690543539c8e9ad5213b12f (diff)
nsfs: use inode_just_drop()
Currently nsfs uses the default inode_generic_drop() fallback which drops the inode when it's unlinked or when it's unhashed. Since nsfs never hashes inodes that always amounts to dropping the inode. But that's just annoying to have to reason through every time we look at this code. Switch to inode_just_drop() which always drops the inode explicitly. This also aligns the behavior with pidfs which does the same. Link: https://patch.msgid.link/20251029-work-namespace-nstree-listns-v4-2-2e6f823ebdc0@kernel.org Tested-by: syzbot@syzkaller.appspotmail.com Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
-rw-r--r--fs/nsfs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nsfs.c b/fs/nsfs.c
index 79b026a36fb6..ded833f66d4d 100644
--- a/fs/nsfs.c
+++ b/fs/nsfs.c
@@ -408,6 +408,7 @@ static const struct super_operations nsfs_ops = {
.statfs = simple_statfs,
.evict_inode = nsfs_evict,
.show_path = nsfs_show_path,
+ .drop_inode = inode_just_drop,
};
static int nsfs_init_inode(struct inode *inode, void *data)