[12/16] umem: don't override the queue_lock
diff mbox series

Message ID 20181114160219.28328-13-hch@lst.de
State New
Headers show
Series
  • [01/16] block: remove QUEUE_FLAG_BYPASS and ->bypass
Related show

Commit Message

Christoph Hellwig Nov. 14, 2018, 4:02 p.m. UTC
The umem card->lock and the block layer queue_lock are used for entirely
different resources.  Stop using card->lock as the block layer
queue_lock.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/block/umem.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Hannes Reinecke Nov. 15, 2018, 6:59 a.m. UTC | #1
On 11/14/18 5:02 PM, Christoph Hellwig wrote:
> The umem card->lock and the block layer queue_lock are used for entirely
> different resources.  Stop using card->lock as the block layer
> queue_lock.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/block/umem.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/block/umem.c b/drivers/block/umem.c
> index be3e3ab79950..8a27b5adc2b3 100644
> --- a/drivers/block/umem.c
> +++ b/drivers/block/umem.c
> @@ -888,8 +888,7 @@ static int mm_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
>   	card->biotail = &card->bio;
>   	spin_lock_init(&card->lock);
>   
> -	card->queue = blk_alloc_queue_node(GFP_KERNEL, NUMA_NO_NODE,
> -					   &card->lock);
> +	card->queue = blk_alloc_queue_node(GFP_KERNEL, NUMA_NO_NODE, NULL);
>   	if (!card->queue)
>   		goto failed_alloc;
>   
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes

Patch
diff mbox series

diff --git a/drivers/block/umem.c b/drivers/block/umem.c
index be3e3ab79950..8a27b5adc2b3 100644
--- a/drivers/block/umem.c
+++ b/drivers/block/umem.c
@@ -888,8 +888,7 @@  static int mm_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 	card->biotail = &card->bio;
 	spin_lock_init(&card->lock);
 
-	card->queue = blk_alloc_queue_node(GFP_KERNEL, NUMA_NO_NODE,
-					   &card->lock);
+	card->queue = blk_alloc_queue_node(GFP_KERNEL, NUMA_NO_NODE, NULL);
 	if (!card->queue)
 		goto failed_alloc;