Skip to content

Commit dbb3070

Browse files
Al ViroKernel Patches Daemon
authored andcommitted
get rid of kill_litter_super()
Not used anymore. Signed-off-by: Al Viro <[email protected]>
1 parent 564e87b commit dbb3070

File tree

6 files changed

+7
-32
lines changed

6 files changed

+7
-32
lines changed

Documentation/filesystems/porting.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,3 +1309,10 @@ a different length, use
13091309
vfs_parse_fs_qstr(fc, key, &QSTR_LEN(value, len))
13101310

13111311
instead.
1312+
1313+
---
1314+
1315+
**mandatory**
1316+
1317+
kill_litter_super() is gone; convert to DCACHE_PERSISTENT use (as all
1318+
in-tree filesystems have done).

fs/dcache.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3167,27 +3167,6 @@ bool is_subdir(struct dentry *new_dentry, struct dentry *old_dentry)
31673167
}
31683168
EXPORT_SYMBOL(is_subdir);
31693169

3170-
static enum d_walk_ret d_genocide_kill(void *data, struct dentry *dentry)
3171-
{
3172-
struct dentry *root = data;
3173-
if (dentry != root) {
3174-
if (d_unhashed(dentry) || !dentry->d_inode ||
3175-
dentry->d_flags & DCACHE_PERSISTENT)
3176-
return D_WALK_SKIP;
3177-
3178-
if (!(dentry->d_flags & DCACHE_GENOCIDE)) {
3179-
dentry->d_flags |= DCACHE_GENOCIDE;
3180-
dentry->d_lockref.count--;
3181-
}
3182-
}
3183-
return D_WALK_CONTINUE;
3184-
}
3185-
3186-
void d_genocide(struct dentry *parent)
3187-
{
3188-
d_walk(parent, parent, d_genocide_kill);
3189-
}
3190-
31913170
void d_mark_tmpfile(struct file *file, struct inode *inode)
31923171
{
31933172
struct dentry *dentry = file->f_path.dentry;

fs/internal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ extern void shrink_dcache_for_umount(struct super_block *);
227227
extern struct dentry *__d_lookup(const struct dentry *, const struct qstr *);
228228
extern struct dentry *__d_lookup_rcu(const struct dentry *parent,
229229
const struct qstr *name, unsigned *seq);
230-
extern void d_genocide(struct dentry *);
231230

232231
/*
233232
* pipe.c

fs/super.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,14 +1284,6 @@ void kill_anon_super(struct super_block *sb)
12841284
}
12851285
EXPORT_SYMBOL(kill_anon_super);
12861286

1287-
void kill_litter_super(struct super_block *sb)
1288-
{
1289-
if (sb->s_root)
1290-
d_genocide(sb->s_root);
1291-
kill_anon_super(sb);
1292-
}
1293-
EXPORT_SYMBOL(kill_litter_super);
1294-
12951287
int set_anon_super_fc(struct super_block *sb, struct fs_context *fc)
12961288
{
12971289
return set_anon_super(sb, NULL);

include/linux/dcache.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ enum dentry_flags {
198198
DCACHE_REFERENCED = BIT(6), /* Recently used, don't discard. */
199199
DCACHE_DONTCACHE = BIT(7), /* Purge from memory on final dput() */
200200
DCACHE_CANT_MOUNT = BIT(8),
201-
DCACHE_GENOCIDE = BIT(9),
202201
DCACHE_SHRINK_LIST = BIT(10),
203202
DCACHE_OP_WEAK_REVALIDATE = BIT(11),
204203
/*

include/linux/fs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2728,7 +2728,6 @@ void retire_super(struct super_block *sb);
27282728
void generic_shutdown_super(struct super_block *sb);
27292729
void kill_block_super(struct super_block *sb);
27302730
void kill_anon_super(struct super_block *sb);
2731-
void kill_litter_super(struct super_block *sb);
27322731
void deactivate_super(struct super_block *sb);
27332732
void deactivate_locked_super(struct super_block *sb);
27342733
int set_anon_super(struct super_block *s, void *data);

0 commit comments

Comments
 (0)