diff options
| author | Ingo Molnar <mingo@kernel.org> | 2016-07-15 10:38:54 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2016-07-15 10:38:54 +0200 |
| commit | 07ccdcd34ac39ddecb8ccd00e5f03d76e9be8881 (patch) | |
| tree | ffd8a0ffd6d803e5fa78c115a83b7dcd3c246d7c /fs/ceph | |
| parent | 3c8fad9183ab7b3b3471fd2bb3d604104dd447cb (diff) | |
| parent | fa3a9f5744a92c0d7856d4e326c8d920d1d31116 (diff) | |
| download | lwn-07ccdcd34ac39ddecb8ccd00e5f03d76e9be8881.tar.gz lwn-07ccdcd34ac39ddecb8ccd00e5f03d76e9be8881.zip | |
Merge branch 'linus' into x86/apic, to refresh the branch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/ceph')
| -rw-r--r-- | fs/ceph/export.c | 10 | ||||
| -rw-r--r-- | fs/ceph/file.c | 2 |
2 files changed, 4 insertions, 8 deletions
diff --git a/fs/ceph/export.c b/fs/ceph/export.c index 6e72c98162d5..1780218a48f0 100644 --- a/fs/ceph/export.c +++ b/fs/ceph/export.c @@ -95,10 +95,8 @@ static struct dentry *__fh_to_dentry(struct super_block *sb, u64 ino) } dentry = d_obtain_alias(inode); - if (IS_ERR(dentry)) { - iput(inode); + if (IS_ERR(dentry)) return dentry; - } err = ceph_init_dentry(dentry); if (err < 0) { dput(dentry); @@ -167,10 +165,8 @@ static struct dentry *__get_parent(struct super_block *sb, return ERR_PTR(-ENOENT); dentry = d_obtain_alias(inode); - if (IS_ERR(dentry)) { - iput(inode); + if (IS_ERR(dentry)) return dentry; - } err = ceph_init_dentry(dentry); if (err < 0) { dput(dentry); @@ -210,7 +206,7 @@ static struct dentry *ceph_fh_to_parent(struct super_block *sb, dout("fh_to_parent %llx\n", cfh->parent_ino); dentry = __get_parent(sb, NULL, cfh->ino); - if (IS_ERR(dentry) && PTR_ERR(dentry) == -ENOENT) + if (unlikely(dentry == ERR_PTR(-ENOENT))) dentry = __fh_to_dentry(sb, cfh->parent_ino); return dentry; } 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, if ((flags & O_CREAT) && !req->r_reply_info.head->is_dentry) err = ceph_handle_notrace_create(dir, dentry); - if (d_unhashed(dentry)) { + if (d_in_lookup(dentry)) { dn = ceph_finish_lookup(req, dentry, err); if (IS_ERR(dn)) err = PTR_ERR(dn); |
