提交 1472b83e 编写于 作者: T Trond Myklebust

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: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 f4ce1299
......@@ -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 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册