mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-03 15:55:38 +00:00
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>
This commit is contained in:
parent
f4ce1299b3
commit
1472b83eae
1 changed files with 3 additions and 1 deletions
|
@ -1407,6 +1407,7 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
|
||||||
struct dentry *res;
|
struct dentry *res;
|
||||||
struct iattr attr = { .ia_valid = ATTR_OPEN };
|
struct iattr attr = { .ia_valid = ATTR_OPEN };
|
||||||
struct inode *inode;
|
struct inode *inode;
|
||||||
|
unsigned int lookup_flags = 0;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
/* Expect a negative dentry */
|
/* Expect a negative dentry */
|
||||||
|
@ -1429,6 +1430,7 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
|
||||||
*/
|
*/
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
|
lookup_flags = LOOKUP_OPEN|LOOKUP_DIRECTORY;
|
||||||
goto no_open;
|
goto no_open;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1479,7 +1481,7 @@ out:
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
no_open:
|
no_open:
|
||||||
res = nfs_lookup(dir, dentry, 0);
|
res = nfs_lookup(dir, dentry, lookup_flags);
|
||||||
err = PTR_ERR(res);
|
err = PTR_ERR(res);
|
||||||
if (IS_ERR(res))
|
if (IS_ERR(res))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
Loading…
Add table
Reference in a new issue