get rid of kill_litter_super()
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 10 Mar 2025 04:06:29 +0000 (00:06 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 18 Nov 2025 04:59:27 +0000 (23:59 -0500)
Not used anymore.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Documentation/filesystems/porting.rst
fs/dcache.c
fs/internal.h
fs/super.c
include/linux/dcache.h
include/linux/fs.h

index 7233b04..4921b3b 100644 (file)
@@ -1309,3 +1309,10 @@ a different length, use
        vfs_parse_fs_qstr(fc, key, &QSTR_LEN(value, len))
 
 instead.
+
+---
+
+**mandatory**
+
+kill_litter_super() is gone; convert to DCACHE_PERSISTENT use (as all
+in-tree filesystems have done).
index 3cc6c38..5ee2e78 100644 (file)
@@ -3167,27 +3167,6 @@ bool is_subdir(struct dentry *new_dentry, struct dentry *old_dentry)
 }
 EXPORT_SYMBOL(is_subdir);
 
-static enum d_walk_ret d_genocide_kill(void *data, struct dentry *dentry)
-{
-       struct dentry *root = data;
-       if (dentry != root) {
-               if (d_unhashed(dentry) || !dentry->d_inode ||
-                   dentry->d_flags & DCACHE_PERSISTENT)
-                       return D_WALK_SKIP;
-
-               if (!(dentry->d_flags & DCACHE_GENOCIDE)) {
-                       dentry->d_flags |= DCACHE_GENOCIDE;
-                       dentry->d_lockref.count--;
-               }
-       }
-       return D_WALK_CONTINUE;
-}
-
-void d_genocide(struct dentry *parent)
-{
-       d_walk(parent, parent, d_genocide_kill);
-}
-
 void d_mark_tmpfile(struct file *file, struct inode *inode)
 {
        struct dentry *dentry = file->f_path.dentry;
index 9b2b4d1..144686a 100644 (file)
@@ -227,7 +227,6 @@ extern void shrink_dcache_for_umount(struct super_block *);
 extern struct dentry *__d_lookup(const struct dentry *, const struct qstr *);
 extern struct dentry *__d_lookup_rcu(const struct dentry *parent,
                                const struct qstr *name, unsigned *seq);
-extern void d_genocide(struct dentry *);
 
 /*
  * pipe.c
index 5bab94f..ee001f6 100644 (file)
@@ -1284,14 +1284,6 @@ void kill_anon_super(struct super_block *sb)
 }
 EXPORT_SYMBOL(kill_anon_super);
 
-void kill_litter_super(struct super_block *sb)
-{
-       if (sb->s_root)
-               d_genocide(sb->s_root);
-       kill_anon_super(sb);
-}
-EXPORT_SYMBOL(kill_litter_super);
-
 int set_anon_super_fc(struct super_block *sb, struct fs_context *fc)
 {
        return set_anon_super(sb, NULL);
index 6ec4066..20a8514 100644 (file)
@@ -198,7 +198,6 @@ enum dentry_flags {
        DCACHE_REFERENCED               = BIT(6),       /* Recently used, don't discard. */
        DCACHE_DONTCACHE                = BIT(7),       /* Purge from memory on final dput() */
        DCACHE_CANT_MOUNT               = BIT(8),
-       DCACHE_GENOCIDE                 = BIT(9),
        DCACHE_SHRINK_LIST              = BIT(10),
        DCACHE_OP_WEAK_REVALIDATE       = BIT(11),
        /*
index f5037c5..95933ce 100644 (file)
@@ -2728,7 +2728,6 @@ void retire_super(struct super_block *sb);
 void generic_shutdown_super(struct super_block *sb);
 void kill_block_super(struct super_block *sb);
 void kill_anon_super(struct super_block *sb);
-void kill_litter_super(struct super_block *sb);
 void deactivate_super(struct super_block *sb);
 void deactivate_locked_super(struct super_block *sb);
 int set_anon_super(struct super_block *s, void *data);