mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]>
This commit is contained in:
parent
951b4bd553
commit
b26d4cd385
11 changed files with 18 additions and 101 deletions
12
fs/libfs.c
12
fs/libfs.c
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue