diff options
Diffstat (limited to 'drivers/block/ll_rw_blk.c')
-rw-r--r-- | drivers/block/ll_rw_blk.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c index 46e54b441663..11ef9d9ea139 100644 --- a/drivers/block/ll_rw_blk.c +++ b/drivers/block/ll_rw_blk.c | |||
@@ -1715,6 +1715,15 @@ request_queue_t *blk_init_queue(request_fn_proc *rfn, spinlock_t *lock) | |||
1715 | if (blk_init_free_list(q)) | 1715 | if (blk_init_free_list(q)) |
1716 | goto out_init; | 1716 | goto out_init; |
1717 | 1717 | ||
1718 | /* | ||
1719 | * if caller didn't supply a lock, they get per-queue locking with | ||
1720 | * our embedded lock | ||
1721 | */ | ||
1722 | if (!lock) { | ||
1723 | spin_lock_init(&q->__queue_lock); | ||
1724 | lock = &q->__queue_lock; | ||
1725 | } | ||
1726 | |||
1718 | q->request_fn = rfn; | 1727 | q->request_fn = rfn; |
1719 | q->back_merge_fn = ll_back_merge_fn; | 1728 | q->back_merge_fn = ll_back_merge_fn; |
1720 | q->front_merge_fn = ll_front_merge_fn; | 1729 | q->front_merge_fn = ll_front_merge_fn; |