From: Al Viro Date: Sun, 14 Jul 2013 13:48:35 +0000 (+0400) Subject: efivarfs: we can use simple_lookup() now X-Git-Tag: v3.11-rc1~2^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e8cd2cb46e3c772871c86de2ffb718f911f9b59;p=platform%2Fupstream%2Fkernel-adaptation-pc.git efivarfs: we can use simple_lookup() now Signed-off-by: Al Viro --- diff --git a/fs/efivarfs/inode.c b/fs/efivarfs/inode.c index 7e787fb..07ab497 100644 --- a/fs/efivarfs/inode.c +++ b/fs/efivarfs/inode.c @@ -155,20 +155,8 @@ static int efivarfs_unlink(struct inode *dir, struct dentry *dentry) return 0; }; -/* - * Handle negative dentry. - */ -static struct dentry *efivarfs_lookup(struct inode *dir, struct dentry *dentry, - unsigned int flags) -{ - if (dentry->d_name.len > NAME_MAX) - return ERR_PTR(-ENAMETOOLONG); - d_add(dentry, NULL); - return NULL; -} - const struct inode_operations efivarfs_dir_inode_operations = { - .lookup = efivarfs_lookup, + .lookup = simple_lookup, .unlink = efivarfs_unlink, .create = efivarfs_create, };