diff options
Diffstat (limited to 'fs/ceph/dir.c')
-rw-r--r-- | fs/ceph/dir.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 2c924e8d85fe..58abc3da6111 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c | |||
@@ -112,7 +112,6 @@ static int __dcache_readdir(struct file *filp, | |||
112 | dout("__dcache_readdir %p at %llu (last %p)\n", dir, filp->f_pos, | 112 | dout("__dcache_readdir %p at %llu (last %p)\n", dir, filp->f_pos, |
113 | last); | 113 | last); |
114 | 114 | ||
115 | spin_lock(&dcache_lock); | ||
116 | spin_lock(&parent->d_lock); | 115 | spin_lock(&parent->d_lock); |
117 | 116 | ||
118 | /* start at beginning? */ | 117 | /* start at beginning? */ |
@@ -156,7 +155,6 @@ more: | |||
156 | dget_dlock(dentry); | 155 | dget_dlock(dentry); |
157 | spin_unlock(&dentry->d_lock); | 156 | spin_unlock(&dentry->d_lock); |
158 | spin_unlock(&parent->d_lock); | 157 | spin_unlock(&parent->d_lock); |
159 | spin_unlock(&dcache_lock); | ||
160 | 158 | ||
161 | dout(" %llu (%llu) dentry %p %.*s %p\n", di->offset, filp->f_pos, | 159 | dout(" %llu (%llu) dentry %p %.*s %p\n", di->offset, filp->f_pos, |
162 | dentry, dentry->d_name.len, dentry->d_name.name, dentry->d_inode); | 160 | dentry, dentry->d_name.len, dentry->d_name.name, dentry->d_inode); |
@@ -182,21 +180,19 @@ more: | |||
182 | 180 | ||
183 | filp->f_pos++; | 181 | filp->f_pos++; |
184 | 182 | ||
185 | /* make sure a dentry wasn't dropped while we didn't have dcache_lock */ | 183 | /* make sure a dentry wasn't dropped while we didn't have parent lock */ |
186 | if (!ceph_i_test(dir, CEPH_I_COMPLETE)) { | 184 | if (!ceph_i_test(dir, CEPH_I_COMPLETE)) { |
187 | dout(" lost I_COMPLETE on %p; falling back to mds\n", dir); | 185 | dout(" lost I_COMPLETE on %p; falling back to mds\n", dir); |
188 | err = -EAGAIN; | 186 | err = -EAGAIN; |
189 | goto out; | 187 | goto out; |
190 | } | 188 | } |
191 | 189 | ||
192 | spin_lock(&dcache_lock); | ||
193 | spin_lock(&parent->d_lock); | 190 | spin_lock(&parent->d_lock); |
194 | p = p->prev; /* advance to next dentry */ | 191 | p = p->prev; /* advance to next dentry */ |
195 | goto more; | 192 | goto more; |
196 | 193 | ||
197 | out_unlock: | 194 | out_unlock: |
198 | spin_unlock(&parent->d_lock); | 195 | spin_unlock(&parent->d_lock); |
199 | spin_unlock(&dcache_lock); | ||
200 | out: | 196 | out: |
201 | if (last) | 197 | if (last) |
202 | dput(last); | 198 | dput(last); |