diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2025-02-23 20:18:15 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2025-06-11 13:39:52 -0400 |
commit | 691fb82ca6ccdcdb9e60e754b55659271d5280e7 (patch) | |
tree | 8e1316e8b13c3bdb13a4278931dfed387722fc6c /fs/dcache.c | |
parent | a97dc087da06b69ae976765d59810ca705e8dae1 (diff) |
make d_set_d_op() static
Convert the last user (d_alloc_pseudo()) and be done with that.
Any out-of-tree filesystem using it should switch to d_splice_alias_ops()
or, better yet, check whether it really needs to have ->d_op vary among
its dentries.
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r-- | fs/dcache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index 7519c5f66f79..4e6ab27471a4 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1821,8 +1821,9 @@ struct dentry *d_alloc_pseudo(struct super_block *sb, const struct qstr *name) struct dentry *dentry = __d_alloc(sb, name); if (likely(dentry)) { dentry->d_flags |= DCACHE_NORCU; + /* d_op_flags(&anon_ops) is 0 */ if (!dentry->d_op) - d_set_d_op(dentry, &anon_ops); + dentry->d_op = &anon_ops; } return dentry; } @@ -1864,7 +1865,7 @@ static unsigned int d_op_flags(const struct dentry_operations *op) return flags; } -void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op) +static void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op) { unsigned int flags = d_op_flags(op); WARN_ON_ONCE(dentry->d_op); @@ -1873,7 +1874,6 @@ void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op) if (flags) dentry->d_flags |= flags; } -EXPORT_SYMBOL(d_set_d_op); void set_default_d_op(struct super_block *s, const struct dentry_operations *ops) { |