]> Git Repo - linux.git/blobdiff - drivers/usb/core/inode.c
kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT
[linux.git] / drivers / usb / core / inode.c
index b690aa35df9a35117394c4177213e3f5ad286162..1b125c224dcf8d4d73f5a094edb6f4417c8e88e4 100644 (file)
@@ -343,17 +343,19 @@ static int usbfs_empty (struct dentry *dentry)
 {
        struct list_head *list;
 
-       spin_lock(&dcache_lock);
-
+       spin_lock(&dentry->d_lock);
        list_for_each(list, &dentry->d_subdirs) {
                struct dentry *de = list_entry(list, struct dentry, d_u.d_child);
+
+               spin_lock_nested(&de->d_lock, DENTRY_D_LOCK_NESTED);
                if (usbfs_positive(de)) {
-                       spin_unlock(&dcache_lock);
+                       spin_unlock(&de->d_lock);
+                       spin_unlock(&dentry->d_lock);
                        return 0;
                }
+               spin_unlock(&de->d_lock);
        }
-
-       spin_unlock(&dcache_lock);
+       spin_unlock(&dentry->d_lock);
        return 1;
 }
 
This page took 0.036134 seconds and 4 git commands to generate.