summaryrefslogtreecommitdiff
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-07-05 09:44:53 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-07-05 16:02:23 -0400
commit00699ad8571afd7fb8bc2c61f67c86c2428680ab (patch)
tree60eef261c45881ff0985f2613047d9d58d20a857 /fs/nfs/dir.c
parenta99cde438de0c4c0cecc1d1af1a55a75b10bfdef (diff)
Use the right predicate in ->atomic_open() instances
->atomic_open() can be given an in-lookup dentry *or* a negative one found in dcache. Use d_in_lookup() to tell one from another, rather than d_unhashed(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index d8015a03db4c..3d5eb5edbf50 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1504,7 +1504,7 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
/* NFS only supports OPEN on regular files */
if ((open_flags & O_DIRECTORY)) {
- if (!d_unhashed(dentry)) {
+ if (!d_in_lookup(dentry)) {
/*
* Hashed negative dentry with O_DIRECTORY: dentry was
* revalidated and is fine, no need to perform lookup