aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/klist.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/klist.c b/lib/klist.c
index 02177d72dc89..738ab810160a 100644
--- a/lib/klist.c
+++ b/lib/klist.c
@@ -145,9 +145,10 @@ EXPORT_SYMBOL_GPL(klist_del);
145 145
146void klist_remove(struct klist_node * n) 146void klist_remove(struct klist_node * n)
147{ 147{
148 spin_lock(&n->n_klist->k_lock); 148 struct klist * k = n->n_klist;
149 spin_lock(&k->k_lock);
149 klist_dec_and_del(n); 150 klist_dec_and_del(n);
150 spin_unlock(&n->n_klist->k_lock); 151 spin_unlock(&k->k_lock);
151 wait_for_completion(&n->n_removed); 152 wait_for_completion(&n->n_removed);
152} 153}
153 154