diff options
author | Steve French <sfrench@us.ibm.com> | 2011-01-09 23:18:16 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2011-01-09 23:18:16 +0000 |
commit | acc6f11272ce4f77c40b1a6292eb198fd6aaf8c3 (patch) | |
tree | 2da3a61b6726707a89f1cf93446aabd2fb00e1f0 /drivers/usb/core/inode.c | |
parent | 7e12eddb73d4f288b0339ee13832a34d6bc4fd90 (diff) | |
parent | 0c21e3aaf6ae85bee804a325aa29c325209180fd (diff) |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
fs/cifs/dir.c
Diffstat (limited to 'drivers/usb/core/inode.c')
-rw-r--r-- | drivers/usb/core/inode.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c index b690aa35df9..1b125c224dc 100644 --- a/drivers/usb/core/inode.c +++ b/drivers/usb/core/inode.c @@ -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; } |