VFS: normal filesystems (and lustre): d_inode() annotations
[deliverable/linux.git] / fs / efivarfs / inode.c
index 7e787fb90293ecd920998d37f227533bab371833..3381b9da9ee6080881720f0500b71c74ecdf6058 100644 (file)
@@ -145,30 +145,18 @@ out:
 
 static int efivarfs_unlink(struct inode *dir, struct dentry *dentry)
 {
-       struct efivar_entry *var = dentry->d_inode->i_private;
+       struct efivar_entry *var = d_inode(dentry)->i_private;
 
        if (efivar_entry_delete(var))
                return -EINVAL;
 
-       drop_nlink(dentry->d_inode);
+       drop_nlink(d_inode(dentry));
        dput(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,
 };
This page took 0.054018 seconds and 5 git commands to generate.