summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-08-20 11:59:41 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-08-22 08:58:17 -0400
commit1472b83eae0bf09ab76ebcb1373dbd210e97f911 (patch)
treedd0fe755f736cc0a7d1cfb364e7aabe525e9de22
parentf4ce1299b329e96bb247c95c4fee8809827d6931 (diff)
NFS: Pass in lookup flags from nfs_atomic_open to nfs_lookup
When doing an open of a directory, ensure that we do pass the lookup flags from nfs_atomic_open into nfs_lookup. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--fs/nfs/dir.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index be3da6fe3ad4..29d5463dcd65 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1407,6 +1407,7 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
struct dentry *res;
struct iattr attr = { .ia_valid = ATTR_OPEN };
struct inode *inode;
+ unsigned int lookup_flags = 0;
int err;
/* Expect a negative dentry */
@@ -1429,6 +1430,7 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
*/
return -ENOENT;
}
+ lookup_flags = LOOKUP_OPEN|LOOKUP_DIRECTORY;
goto no_open;
}
@@ -1479,7 +1481,7 @@ out:
return err;
no_open:
- res = nfs_lookup(dir, dentry, 0);
+ res = nfs_lookup(dir, dentry, lookup_flags);
err = PTR_ERR(res);
if (IS_ERR(res))
goto out;