aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ncpfs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ncpfs/dir.c')
-rw-r--r--fs/ncpfs/dir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c
index bbbf7922f422..102278ed38bd 100644
--- a/fs/ncpfs/dir.c
+++ b/fs/ncpfs/dir.c
@@ -392,6 +392,7 @@ ncp_dget_fpos(struct dentry *dentry, struct dentry *parent, unsigned long fpos)
392 392
393 /* If a pointer is invalid, we search the dentry. */ 393 /* If a pointer is invalid, we search the dentry. */
394 spin_lock(&dcache_lock); 394 spin_lock(&dcache_lock);
395 spin_lock(&parent->d_lock);
395 next = parent->d_subdirs.next; 396 next = parent->d_subdirs.next;
396 while (next != &parent->d_subdirs) { 397 while (next != &parent->d_subdirs) {
397 dent = list_entry(next, struct dentry, d_u.d_child); 398 dent = list_entry(next, struct dentry, d_u.d_child);
@@ -400,11 +401,13 @@ ncp_dget_fpos(struct dentry *dentry, struct dentry *parent, unsigned long fpos)
400 dget_locked(dent); 401 dget_locked(dent);
401 else 402 else
402 dent = NULL; 403 dent = NULL;
404 spin_unlock(&parent->d_lock);
403 spin_unlock(&dcache_lock); 405 spin_unlock(&dcache_lock);
404 goto out; 406 goto out;
405 } 407 }
406 next = next->next; 408 next = next->next;
407 } 409 }
410 spin_unlock(&parent->d_lock);
408 spin_unlock(&dcache_lock); 411 spin_unlock(&dcache_lock);
409 return NULL; 412 return NULL;
410 413