switch ll_lookup_finish_locks() and ll_revalidate_it_finish() to inode
[deliverable/linux.git] / drivers / staging / lustre / lustre / llite / namei.c
index 4f361b77c749a718621c8767ec97663e43a7c87f..890ac190f5faf3300ab8461f08cfe63182078c27 100644 (file)
@@ -481,6 +481,7 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
        struct lookup_intent lookup_it = { .it_op = IT_LOOKUP };
        struct dentry *save = dentry, *retval;
        struct ptlrpc_request *req = NULL;
+       struct inode *inode;
        struct md_op_data *op_data;
        __u32 opc;
        int rc;
@@ -539,12 +540,13 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
                goto out;
        }
 
-       if ((it->it_op & IT_OPEN) && dentry->d_inode &&
-           !S_ISREG(dentry->d_inode->i_mode) &&
-           !S_ISDIR(dentry->d_inode->i_mode)) {
-               ll_release_openhandle(dentry->d_inode, it);
+       inode = dentry->d_inode;
+       if ((it->it_op & IT_OPEN) && inode &&
+           !S_ISREG(inode->i_mode) &&
+           !S_ISDIR(inode->i_mode)) {
+               ll_release_openhandle(inode, it);
        }
-       ll_lookup_finish_locks(it, dentry);
+       ll_lookup_finish_locks(it, inode);
 
        if (dentry == save)
                retval = NULL;
This page took 0.031242 seconds and 5 git commands to generate.