]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
configfs, securityfs: kill_litter_super() not needed
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 10 Mar 2025 03:54:44 +0000 (23:54 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 16 Nov 2025 06:35:02 +0000 (01:35 -0500)
These are guaranteed to be empty by the time they are shut down;
both are single-instance and there is an internal mount maintained
for as long as there is any contents.

Both have that internal mount pinned by every object in root.

In other words, kill_litter_super() boils down to kill_anon_super()
for those.

Reviewed-by: Joel Becker <jlbec@evilplan.org>
Acked-by: Paul Moore <paul@paul-moore> (LSM)
Acked-by: Andreas Hindborg <a.hindborg@kernel.org> (configfs)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/configfs/mount.c
security/inode.c

index 456c4a2efb53297f3799dbc359d900a9c5afff9d..4929f343118946eaa55a539db4192e9c6621a8dc 100644 (file)
@@ -116,7 +116,7 @@ static struct file_system_type configfs_fs_type = {
        .owner          = THIS_MODULE,
        .name           = "configfs",
        .init_fs_context = configfs_init_fs_context,
-       .kill_sb        = kill_litter_super,
+       .kill_sb        = kill_anon_super,
 };
 MODULE_ALIAS_FS("configfs");
 
index 43382ef8896e1dfe16eb1d5f035c8141004ff625..bf7b5e2e695568068078df6b26e2f5e6d6824bfe 100644 (file)
@@ -70,7 +70,7 @@ static struct file_system_type fs_type = {
        .owner =        THIS_MODULE,
        .name =         "securityfs",
        .init_fs_context = securityfs_init_fs_context,
-       .kill_sb =      kill_litter_super,
+       .kill_sb =      kill_anon_super,
 };
 
 /**