Whamcloud - gitweb
b=15692 statahead should hold parent dir's i_mutex to synchronize with other operatio...
[fs/lustre-release.git] / lustre / llite / namei.c
index 187cfea..61fb628 100644 (file)
@@ -154,7 +154,6 @@ static void ll_drop_negative_dentry(struct inode *dir)
 {
         struct dentry *dentry, *tmp_alias, *tmp_subdir;
 
-        spin_lock(&ll_lookup_lock);
         spin_lock(&dcache_lock);
 restart:
         list_for_each_entry_safe(dentry, tmp_alias,
@@ -175,7 +174,6 @@ restart:
                 }
         }
         spin_unlock(&dcache_lock);
-        spin_unlock(&ll_lookup_lock);
 }
 
 
@@ -350,7 +348,6 @@ static struct dentry *ll_find_alias(struct inode *inode, struct dentry *de)
         struct dentry *dentry;
         struct dentry *last_discon = NULL;
 
-        spin_lock(&ll_lookup_lock);
         spin_lock(&dcache_lock);
         list_for_each(tmp, &inode->i_dentry) {
                 dentry = list_entry(tmp, struct dentry, d_alias);
@@ -387,7 +384,6 @@ static struct dentry *ll_find_alias(struct inode *inode, struct dentry *de)
                 ll_dops_init(dentry, 0);
                 d_rehash_cond(dentry, 0); /* avoid taking dcache_lock inside */
                 spin_unlock(&dcache_lock);
-                spin_unlock(&ll_lookup_lock);
                 iput(inode);
                 CDEBUG(D_DENTRY, "alias dentry %.*s (%p) parent %p inode %p "
                        "refc %d\n", de->d_name.len, de->d_name.name, de,
@@ -404,7 +400,6 @@ static struct dentry *ll_find_alias(struct inode *inode, struct dentry *de)
                 last_discon->d_flags |= DCACHE_LUSTRE_INVALID;
                 unlock_dentry(last_discon);
                 spin_unlock(&dcache_lock);
-                spin_unlock(&ll_lookup_lock);
                 ll_dops_init(last_discon, 1);
                 d_rehash(de);
                 d_move(last_discon, de);
@@ -415,7 +410,6 @@ static struct dentry *ll_find_alias(struct inode *inode, struct dentry *de)
         ll_d_add(de, inode);
 
         spin_unlock(&dcache_lock);
-        spin_unlock(&ll_lookup_lock);
 
         return de;
 }
@@ -471,7 +465,7 @@ int ll_lookup_it_finish(struct ptlrpc_request *request,
                 /* we have lookup look - unhide dentry */
                 if (bits & MDS_INODELOCK_LOOKUP) {
                         lock_dentry(*de);
-                        (*de)->d_flags &= ~(DCACHE_LUSTRE_INVALID);
+                        (*de)->d_flags &= ~DCACHE_LUSTRE_INVALID;
                         unlock_dentry(*de);
                 }
         } else {
@@ -583,7 +577,7 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
             !S_ISDIR(dentry->d_inode->i_mode)) {
                 ll_release_openhandle(dentry, it);
         }
-        ll_lookup_finish_locks(it, dentry);
+        ll_finish_locks(it, dentry);
 
         if (dentry == save)
                 GOTO(out, retval = NULL);