proc: less LOCK operations during lookup
[safe/jmp/linux-2.6] / fs / proc / generic.c
index 6a2fe51..75cd8d7 100644 (file)
@@ -406,12 +406,12 @@ struct dentry *proc_lookup(struct inode * dir, struct dentry *dentry, struct nam
                                spin_unlock(&proc_subdir_lock);
                                error = -EINVAL;
                                inode = proc_get_inode(dir->i_sb, ino, de);
-                               spin_lock(&proc_subdir_lock);
-                               break;
+                               goto out_unlock;
                        }
                }
        }
        spin_unlock(&proc_subdir_lock);
+out_unlock:
        unlock_kernel();
 
        if (inode) {