aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/irda/irqueue.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/irda/irqueue.c b/net/irda/irqueue.c
index 92662330dbcf..d058b467f9e4 100644
--- a/net/irda/irqueue.c
+++ b/net/irda/irqueue.c
@@ -384,6 +384,9 @@ EXPORT_SYMBOL(hashbin_new);
384 * for deallocating this structure if it's complex. If not the user can 384 * for deallocating this structure if it's complex. If not the user can
385 * just supply kfree, which should take care of the job. 385 * just supply kfree, which should take care of the job.
386 */ 386 */
387#ifdef CONFIG_LOCKDEP
388static int hashbin_lock_depth = 0;
389#endif
387int hashbin_delete( hashbin_t* hashbin, FREE_FUNC free_func) 390int hashbin_delete( hashbin_t* hashbin, FREE_FUNC free_func)
388{ 391{
389 irda_queue_t* queue; 392 irda_queue_t* queue;
@@ -395,7 +398,8 @@ int hashbin_delete( hashbin_t* hashbin, FREE_FUNC free_func)
395 398
396 /* Synchronize */ 399 /* Synchronize */
397 if ( hashbin->hb_type & HB_LOCK ) { 400 if ( hashbin->hb_type & HB_LOCK ) {
398 spin_lock_irqsave(&hashbin->hb_spinlock, flags); 401 spin_lock_irqsave_nested(&hashbin->hb_spinlock, flags,
402 hashbin_lock_depth++);
399 } 403 }
400 404
401 /* 405 /*
@@ -419,6 +423,9 @@ int hashbin_delete( hashbin_t* hashbin, FREE_FUNC free_func)
419 /* Release lock */ 423 /* Release lock */
420 if ( hashbin->hb_type & HB_LOCK) { 424 if ( hashbin->hb_type & HB_LOCK) {
421 spin_unlock_irqrestore(&hashbin->hb_spinlock, flags); 425 spin_unlock_irqrestore(&hashbin->hb_spinlock, flags);
426#ifdef CONFIG_LOCKDEP
427 hashbin_lock_depth--;
428#endif
422 } 429 }
423 430
424 /* 431 /*