aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_fs.c6
-rw-r--r--drivers/infiniband/hw/qib/qib_fs.c3
-rw-r--r--drivers/staging/pohmelfs/path_entry.c2
-rw-r--r--drivers/staging/smbfs/cache.c4
-rw-r--r--drivers/usb/core/inode.c3
5 files changed, 1 insertions, 17 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c
index 18aee04a8411..925e88227ded 100644
--- a/drivers/infiniband/hw/ipath/ipath_fs.c
+++ b/drivers/infiniband/hw/ipath/ipath_fs.c
@@ -277,18 +277,14 @@ static int remove_file(struct dentry *parent, char *name)
277 goto bail; 277 goto bail;
278 } 278 }
279 279
280 spin_lock(&dcache_lock);
281 spin_lock(&tmp->d_lock); 280 spin_lock(&tmp->d_lock);
282 if (!(d_unhashed(tmp) && tmp->d_inode)) { 281 if (!(d_unhashed(tmp) && tmp->d_inode)) {
283 dget_locked_dlock(tmp); 282 dget_locked_dlock(tmp);
284 __d_drop(tmp); 283 __d_drop(tmp);
285 spin_unlock(&tmp->d_lock); 284 spin_unlock(&tmp->d_lock);
286 spin_unlock(&dcache_lock);
287 simple_unlink(parent->d_inode, tmp); 285 simple_unlink(parent->d_inode, tmp);
288 } else { 286 } else
289 spin_unlock(&tmp->d_lock); 287 spin_unlock(&tmp->d_lock);
290 spin_unlock(&dcache_lock);
291 }
292 288
293 ret = 0; 289 ret = 0;
294bail: 290bail:
diff --git a/drivers/infiniband/hw/qib/qib_fs.c b/drivers/infiniband/hw/qib/qib_fs.c
index fe4b242f0094..49af4a6538ba 100644
--- a/drivers/infiniband/hw/qib/qib_fs.c
+++ b/drivers/infiniband/hw/qib/qib_fs.c
@@ -453,17 +453,14 @@ static int remove_file(struct dentry *parent, char *name)
453 goto bail; 453 goto bail;
454 } 454 }
455 455
456 spin_lock(&dcache_lock);
457 spin_lock(&tmp->d_lock); 456 spin_lock(&tmp->d_lock);
458 if (!(d_unhashed(tmp) && tmp->d_inode)) { 457 if (!(d_unhashed(tmp) && tmp->d_inode)) {
459 dget_locked_dlock(tmp); 458 dget_locked_dlock(tmp);
460 __d_drop(tmp); 459 __d_drop(tmp);
461 spin_unlock(&tmp->d_lock); 460 spin_unlock(&tmp->d_lock);
462 spin_unlock(&dcache_lock);
463 simple_unlink(parent->d_inode, tmp); 461 simple_unlink(parent->d_inode, tmp);
464 } else { 462 } else {
465 spin_unlock(&tmp->d_lock); 463 spin_unlock(&tmp->d_lock);
466 spin_unlock(&dcache_lock);
467 } 464 }
468 465
469 ret = 0; 466 ret = 0;
diff --git a/drivers/staging/pohmelfs/path_entry.c b/drivers/staging/pohmelfs/path_entry.c
index bbe42f42ca8f..400a9fc386ad 100644
--- a/drivers/staging/pohmelfs/path_entry.c
+++ b/drivers/staging/pohmelfs/path_entry.c
@@ -101,7 +101,6 @@ rename_retry:
101 d = first; 101 d = first;
102 seq = read_seqbegin(&rename_lock); 102 seq = read_seqbegin(&rename_lock);
103 rcu_read_lock(); 103 rcu_read_lock();
104 spin_lock(&dcache_lock);
105 104
106 if (!IS_ROOT(d) && d_unhashed(d)) 105 if (!IS_ROOT(d) && d_unhashed(d))
107 len += UNHASHED_OBSCURE_STRING_SIZE; /* Obscure " (deleted)" string */ 106 len += UNHASHED_OBSCURE_STRING_SIZE; /* Obscure " (deleted)" string */
@@ -110,7 +109,6 @@ rename_retry:
110 len += d->d_name.len + 1; /* Plus slash */ 109 len += d->d_name.len + 1; /* Plus slash */
111 d = d->d_parent; 110 d = d->d_parent;
112 } 111 }
113 spin_unlock(&dcache_lock);
114 rcu_read_unlock(); 112 rcu_read_unlock();
115 if (read_seqretry(&rename_lock, seq)) 113 if (read_seqretry(&rename_lock, seq))
116 goto rename_retry; 114 goto rename_retry;
diff --git a/drivers/staging/smbfs/cache.c b/drivers/staging/smbfs/cache.c
index 920434b6c071..75dfd403fb90 100644
--- a/drivers/staging/smbfs/cache.c
+++ b/drivers/staging/smbfs/cache.c
@@ -62,7 +62,6 @@ smb_invalidate_dircache_entries(struct dentry *parent)
62 struct list_head *next; 62 struct list_head *next;
63 struct dentry *dentry; 63 struct dentry *dentry;
64 64
65 spin_lock(&dcache_lock);
66 spin_lock(&parent->d_lock); 65 spin_lock(&parent->d_lock);
67 next = parent->d_subdirs.next; 66 next = parent->d_subdirs.next;
68 while (next != &parent->d_subdirs) { 67 while (next != &parent->d_subdirs) {
@@ -72,7 +71,6 @@ smb_invalidate_dircache_entries(struct dentry *parent)
72 next = next->next; 71 next = next->next;
73 } 72 }
74 spin_unlock(&parent->d_lock); 73 spin_unlock(&parent->d_lock);
75 spin_unlock(&dcache_lock);
76} 74}
77 75
78/* 76/*
@@ -98,7 +96,6 @@ smb_dget_fpos(struct dentry *dentry, struct dentry *parent, unsigned long fpos)
98 } 96 }
99 97
100 /* If a pointer is invalid, we search the dentry. */ 98 /* If a pointer is invalid, we search the dentry. */
101 spin_lock(&dcache_lock);
102 spin_lock(&parent->d_lock); 99 spin_lock(&parent->d_lock);
103 next = parent->d_subdirs.next; 100 next = parent->d_subdirs.next;
104 while (next != &parent->d_subdirs) { 101 while (next != &parent->d_subdirs) {
@@ -115,7 +112,6 @@ smb_dget_fpos(struct dentry *dentry, struct dentry *parent, unsigned long fpos)
115 dent = NULL; 112 dent = NULL;
116out_unlock: 113out_unlock:
117 spin_unlock(&parent->d_lock); 114 spin_unlock(&parent->d_lock);
118 spin_unlock(&dcache_lock);
119 return dent; 115 return dent;
120} 116}
121 117
diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c
index 89a0e8366585..1b125c224dcf 100644
--- a/drivers/usb/core/inode.c
+++ b/drivers/usb/core/inode.c
@@ -343,7 +343,6 @@ static int usbfs_empty (struct dentry *dentry)
343{ 343{
344 struct list_head *list; 344 struct list_head *list;
345 345
346 spin_lock(&dcache_lock);
347 spin_lock(&dentry->d_lock); 346 spin_lock(&dentry->d_lock);
348 list_for_each(list, &dentry->d_subdirs) { 347 list_for_each(list, &dentry->d_subdirs) {
349 struct dentry *de = list_entry(list, struct dentry, d_u.d_child); 348 struct dentry *de = list_entry(list, struct dentry, d_u.d_child);
@@ -352,13 +351,11 @@ static int usbfs_empty (struct dentry *dentry)
352 if (usbfs_positive(de)) { 351 if (usbfs_positive(de)) {
353 spin_unlock(&de->d_lock); 352 spin_unlock(&de->d_lock);
354 spin_unlock(&dentry->d_lock); 353 spin_unlock(&dentry->d_lock);
355 spin_unlock(&dcache_lock);
356 return 0; 354 return 0;
357 } 355 }
358 spin_unlock(&de->d_lock); 356 spin_unlock(&de->d_lock);
359 } 357 }
360 spin_unlock(&dentry->d_lock); 358 spin_unlock(&dentry->d_lock);
361 spin_unlock(&dcache_lock);
362 return 1; 359 return 1;
363} 360}
364 361