aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
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 /fs/nfs/dir.c
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>
Diffstat (limited to 'fs/nfs/dir.c')
-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,
1407 struct dentry *res; 1407 struct dentry *res;
1408 struct iattr attr = { .ia_valid = ATTR_OPEN }; 1408 struct iattr attr = { .ia_valid = ATTR_OPEN };
1409 struct inode *inode; 1409 struct inode *inode;
1410 unsigned int lookup_flags = 0;
1410 int err; 1411 int err;
1411 1412
1412 /* Expect a negative dentry */ 1413 /* Expect a negative dentry */
@@ -1429,6 +1430,7 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
1429 */ 1430 */
1430 return -ENOENT; 1431 return -ENOENT;
1431 } 1432 }
1433 lookup_flags = LOOKUP_OPEN|LOOKUP_DIRECTORY;
1432 goto no_open; 1434 goto no_open;
1433 } 1435 }
1434 1436
@@ -1479,7 +1481,7 @@ out:
1479 return err; 1481 return err;
1480 1482
1481no_open: 1483no_open:
1482 res = nfs_lookup(dir, dentry, 0); 1484 res = nfs_lookup(dir, dentry, lookup_flags);
1483 err = PTR_ERR(res); 1485 err = PTR_ERR(res);
1484 if (IS_ERR(res)) 1486 if (IS_ERR(res))
1485 goto out; 1487 goto out;