diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-10-25 18:47:37 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-11-15 22:04:17 -0500 |
commit | b26d4cd385fc51e8844e2cdf9ba2051f5bba11a5 (patch) | |
tree | fcfa7a889b494945abf5705562c0384f88924f78 /fs/libfs.c | |
parent | 951b4bd553e35a291e6b5732ab0124619e81da05 (diff) | |
download | op-kernel-dev-b26d4cd385fc51e8844e2cdf9ba2051f5bba11a5.zip op-kernel-dev-b26d4cd385fc51e8844e2cdf9ba2051f5bba11a5.tar.gz |
consolidate simple ->d_delete() instances
Rename simple_delete_dentry() to always_delete_dentry() and export it.
Export simple_dentry_operations, while we are at it, and get rid of
their duplicates
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/libfs.c')
-rw-r--r-- | fs/libfs.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -47,10 +47,16 @@ EXPORT_SYMBOL(simple_statfs); * Retaining negative dentries for an in-memory filesystem just wastes * memory and lookup time: arrange for them to be deleted immediately. */ -static int simple_delete_dentry(const struct dentry *dentry) +int always_delete_dentry(const struct dentry *dentry) { return 1; } +EXPORT_SYMBOL(always_delete_dentry); + +const struct dentry_operations simple_dentry_operations = { + .d_delete = always_delete_dentry, +}; +EXPORT_SYMBOL(simple_dentry_operations); /* * Lookup the data. This is trivial - if the dentry didn't already @@ -58,10 +64,6 @@ static int simple_delete_dentry(const struct dentry *dentry) */ struct dentry *simple_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) { - static const struct dentry_operations simple_dentry_operations = { - .d_delete = simple_delete_dentry, - }; - if (dentry->d_name.len > NAME_MAX) return ERR_PTR(-ENAMETOOLONG); if (!dentry->d_sb->s_d_op) |