diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2016-07-05 09:44:53 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-07-05 16:02:23 -0400 |
| commit | 00699ad8571afd7fb8bc2c61f67c86c2428680ab (patch) | |
| tree | 60eef261c45881ff0985f2613047d9d58d20a857 /fs/ceph/file.c | |
| parent | a99cde438de0c4c0cecc1d1af1a55a75b10bfdef (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/ceph/file.c')
| -rw-r--r-- | fs/ceph/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index ce2f5795e44b..0daaf7ceedc5 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c | |||
| @@ -394,7 +394,7 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry, | |||
| 394 | if ((flags & O_CREAT) && !req->r_reply_info.head->is_dentry) | 394 | if ((flags & O_CREAT) && !req->r_reply_info.head->is_dentry) |
| 395 | err = ceph_handle_notrace_create(dir, dentry); | 395 | err = ceph_handle_notrace_create(dir, dentry); |
| 396 | 396 | ||
| 397 | if (d_unhashed(dentry)) { | 397 | if (d_in_lookup(dentry)) { |
| 398 | dn = ceph_finish_lookup(req, dentry, err); | 398 | dn = ceph_finish_lookup(req, dentry, err); |
| 399 | if (IS_ERR(dn)) | 399 | if (IS_ERR(dn)) |
| 400 | err = PTR_ERR(dn); | 400 | err = PTR_ERR(dn); |
