summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-07-01 18:20:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-01 18:20:11 -0400
commit48c4565ed66ee7d045ac8d3c442ca7e588b32bc8 (patch)
treee30a05193f2f8010ccd79064095e05c8fb83d2b5 /fs/ceph
parent2728c57fda2c10cb290f1516cab5b170ea2e3f22 (diff)
parente06b933e6ded42384164d28a2060b7f89243b895 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fixes from Al Viro: "Tmpfs readdir throughput regression fix (this cycle) + some -stable fodder all over the place. One missing bit is Miklos' tonight locks.c fix - NFS folks had already grabbed that one by the time I woke up ;-)" [ The locks.c fix came through the nfsd tree just moments ago ] * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: namespace: update event counter when umounting a deleted dentry 9p: use file_dentry() ceph: fix d_obtain_alias() misuses lockless next_positive() libfs.c: new helper - next_positive() dcache_{readdir,dir_lseek}(): don't bother with nested ->d_lock
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/export.c10
1 files changed, 3 insertions, 7 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)
95 } 95 }
96 96
97 dentry = d_obtain_alias(inode); 97 dentry = d_obtain_alias(inode);
98 if (IS_ERR(dentry)) { 98 if (IS_ERR(dentry))
99 iput(inode);
100 return dentry; 99 return dentry;
101 }
102 err = ceph_init_dentry(dentry); 100 err = ceph_init_dentry(dentry);
103 if (err < 0) { 101 if (err < 0) {
104 dput(dentry); 102 dput(dentry);
@@ -167,10 +165,8 @@ static struct dentry *__get_parent(struct super_block *sb,
167 return ERR_PTR(-ENOENT); 165 return ERR_PTR(-ENOENT);
168 166
169 dentry = d_obtain_alias(inode); 167 dentry = d_obtain_alias(inode);
170 if (IS_ERR(dentry)) { 168 if (IS_ERR(dentry))
171 iput(inode);
172 return dentry; 169 return dentry;
173 }
174 err = ceph_init_dentry(dentry); 170 err = ceph_init_dentry(dentry);
175 if (err < 0) { 171 if (err < 0) {
176 dput(dentry); 172 dput(dentry);
@@ -210,7 +206,7 @@ static struct dentry *ceph_fh_to_parent(struct super_block *sb,
210 206
211 dout("fh_to_parent %llx\n", cfh->parent_ino); 207 dout("fh_to_parent %llx\n", cfh->parent_ino);
212 dentry = __get_parent(sb, NULL, cfh->ino); 208 dentry = __get_parent(sb, NULL, cfh->ino);
213 if (IS_ERR(dentry) && PTR_ERR(dentry) == -ENOENT) 209 if (unlikely(dentry == ERR_PTR(-ENOENT)))
214 dentry = __fh_to_dentry(sb, cfh->parent_ino); 210 dentry = __fh_to_dentry(sb, cfh->parent_ino);
215 return dentry; 211 return dentry;
216} 212}