Skip to content

Commit 8219cb5

Browse files
author
Al Viro
committed
kill d_{is,set}_fallthru()
Introduced in 2015 and never had any in-tree users... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 0bec65a commit 8219cb5

2 files changed

Lines changed: 6 additions & 31 deletions

File tree

fs/dcache.c

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ static inline void __d_set_inode_and_type(struct dentry *dentry,
344344

345345
dentry->d_inode = inode;
346346
flags = READ_ONCE(dentry->d_flags);
347-
flags &= ~(DCACHE_ENTRY_TYPE | DCACHE_FALLTHRU);
347+
flags &= ~DCACHE_ENTRY_TYPE;
348348
flags |= type_flags;
349349
smp_store_release(&dentry->d_flags, flags);
350350
}
@@ -353,7 +353,7 @@ static inline void __d_clear_type_and_inode(struct dentry *dentry)
353353
{
354354
unsigned flags = READ_ONCE(dentry->d_flags);
355355

356-
flags &= ~(DCACHE_ENTRY_TYPE | DCACHE_FALLTHRU);
356+
flags &= ~DCACHE_ENTRY_TYPE;
357357
WRITE_ONCE(dentry->d_flags, flags);
358358
dentry->d_inode = NULL;
359359
if (dentry->d_flags & DCACHE_LRU_LIST)
@@ -1936,22 +1936,6 @@ void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op)
19361936
}
19371937
EXPORT_SYMBOL(d_set_d_op);
19381938

1939-
1940-
/*
1941-
* d_set_fallthru - Mark a dentry as falling through to a lower layer
1942-
* @dentry - The dentry to mark
1943-
*
1944-
* Mark a dentry as falling through to the lower layer (as set with
1945-
* d_pin_lower()). This flag may be recorded on the medium.
1946-
*/
1947-
void d_set_fallthru(struct dentry *dentry)
1948-
{
1949-
spin_lock(&dentry->d_lock);
1950-
dentry->d_flags |= DCACHE_FALLTHRU;
1951-
spin_unlock(&dentry->d_lock);
1952-
}
1953-
EXPORT_SYMBOL(d_set_fallthru);
1954-
19551939
static unsigned d_flags_for_inode(struct inode *inode)
19561940
{
19571941
unsigned add_flags = DCACHE_REGULAR_TYPE;

include/linux/dcache.h

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -195,16 +195,15 @@ struct dentry_operations {
195195
#define DCACHE_LRU_LIST BIT(19)
196196

197197
#define DCACHE_ENTRY_TYPE (7 << 20) /* bits 20..22 are for storing type: */
198-
#define DCACHE_MISS_TYPE (0 << 20) /* Negative dentry (maybe fallthru to nowhere) */
198+
#define DCACHE_MISS_TYPE (0 << 20) /* Negative dentry */
199199
#define DCACHE_WHITEOUT_TYPE (1 << 20) /* Whiteout dentry (stop pathwalk) */
200200
#define DCACHE_DIRECTORY_TYPE (2 << 20) /* Normal directory */
201201
#define DCACHE_AUTODIR_TYPE (3 << 20) /* Lookupless directory (presumed automount) */
202-
#define DCACHE_REGULAR_TYPE (4 << 20) /* Regular file type (or fallthru to such) */
203-
#define DCACHE_SPECIAL_TYPE (5 << 20) /* Other file type (or fallthru to such) */
204-
#define DCACHE_SYMLINK_TYPE (6 << 20) /* Symlink (or fallthru to such) */
202+
#define DCACHE_REGULAR_TYPE (4 << 20) /* Regular file type */
203+
#define DCACHE_SPECIAL_TYPE (5 << 20) /* Other file type */
204+
#define DCACHE_SYMLINK_TYPE (6 << 20) /* Symlink */
205205

206206
#define DCACHE_MAY_FREE BIT(23)
207-
#define DCACHE_FALLTHRU BIT(24) /* Fall through to lower layer */
208207
#define DCACHE_NOKEY_NAME BIT(25) /* Encrypted name encoded without key */
209208
#define DCACHE_OP_REAL BIT(26)
210209

@@ -489,14 +488,6 @@ static inline int simple_positive(const struct dentry *dentry)
489488
return d_really_is_positive(dentry) && !d_unhashed(dentry);
490489
}
491490

492-
extern void d_set_fallthru(struct dentry *dentry);
493-
494-
static inline bool d_is_fallthru(const struct dentry *dentry)
495-
{
496-
return dentry->d_flags & DCACHE_FALLTHRU;
497-
}
498-
499-
500491
extern int sysctl_vfs_cache_pressure;
501492

502493
static inline unsigned long vfs_pressure_ratio(unsigned long val)

0 commit comments

Comments
 (0)