Skip to content

Commit 6e8cd2c

Browse files
author
Al Viro
committed
efivarfs: we can use simple_lookup() now
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 74931da commit 6e8cd2c

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

fs/efivarfs/inode.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -155,20 +155,8 @@ static int efivarfs_unlink(struct inode *dir, struct dentry *dentry)
155155
return 0;
156156
};
157157

158-
/*
159-
* Handle negative dentry.
160-
*/
161-
static struct dentry *efivarfs_lookup(struct inode *dir, struct dentry *dentry,
162-
unsigned int flags)
163-
{
164-
if (dentry->d_name.len > NAME_MAX)
165-
return ERR_PTR(-ENAMETOOLONG);
166-
d_add(dentry, NULL);
167-
return NULL;
168-
}
169-
170158
const struct inode_operations efivarfs_dir_inode_operations = {
171-
.lookup = efivarfs_lookup,
159+
.lookup = simple_lookup,
172160
.unlink = efivarfs_unlink,
173161
.create = efivarfs_create,
174162
};

0 commit comments

Comments
 (0)