Skip to content

Commit 5ee0524

Browse files
KAGA-KOKOaxboe
authored andcommitted
block: Add 'lock' as third argument to blk_alloc_queue_node()
This patch does not change any functionality. Signed-off-by: Bart Van Assche <[email protected]> Reviewed-by: Joseph Qi <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Philipp Reisner <[email protected]> Cc: Ulf Hansson <[email protected]> Cc: Kees Cook <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 392db38 commit 5ee0524

File tree

10 files changed

+15
-12
lines changed

10 files changed

+15
-12
lines changed

block/blk-core.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ void blk_exit_rl(struct request_queue *q, struct request_list *rl)
810810

811811
struct request_queue *blk_alloc_queue(gfp_t gfp_mask)
812812
{
813-
return blk_alloc_queue_node(gfp_mask, NUMA_NO_NODE);
813+
return blk_alloc_queue_node(gfp_mask, NUMA_NO_NODE, NULL);
814814
}
815815
EXPORT_SYMBOL(blk_alloc_queue);
816816

@@ -888,7 +888,8 @@ static void blk_rq_timed_out_timer(struct timer_list *t)
888888
kblockd_schedule_work(&q->timeout_work);
889889
}
890890

891-
struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
891+
struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id,
892+
spinlock_t *lock)
892893
{
893894
struct request_queue *q;
894895

@@ -1030,7 +1031,7 @@ blk_init_queue_node(request_fn_proc *rfn, spinlock_t *lock, int node_id)
10301031
{
10311032
struct request_queue *q;
10321033

1033-
q = blk_alloc_queue_node(GFP_KERNEL, node_id);
1034+
q = blk_alloc_queue_node(GFP_KERNEL, node_id, NULL);
10341035
if (!q)
10351036
return NULL;
10361037

block/blk-mq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2556,7 +2556,7 @@ struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set)
25562556
{
25572557
struct request_queue *uninit_q, *q;
25582558

2559-
uninit_q = blk_alloc_queue_node(GFP_KERNEL, set->numa_node);
2559+
uninit_q = blk_alloc_queue_node(GFP_KERNEL, set->numa_node, NULL);
25602560
if (!uninit_q)
25612561
return ERR_PTR(-ENOMEM);
25622562

drivers/block/null_blk.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1760,7 +1760,8 @@ static int null_add_dev(struct nullb_device *dev)
17601760
}
17611761
null_init_queues(nullb);
17621762
} else if (dev->queue_mode == NULL_Q_BIO) {
1763-
nullb->q = blk_alloc_queue_node(GFP_KERNEL, dev->home_node);
1763+
nullb->q = blk_alloc_queue_node(GFP_KERNEL, dev->home_node,
1764+
NULL);
17641765
if (!nullb->q) {
17651766
rv = -ENOMEM;
17661767
goto out_cleanup_queues;

drivers/ide/ide-probe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ static int ide_init_queue(ide_drive_t *drive)
766766
* limits and LBA48 we could raise it but as yet
767767
* do not.
768768
*/
769-
q = blk_alloc_queue_node(GFP_KERNEL, hwif_to_node(hwif));
769+
q = blk_alloc_queue_node(GFP_KERNEL, hwif_to_node(hwif), NULL);
770770
if (!q)
771771
return 1;
772772

drivers/lightnvm/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ static int nvm_create_tgt(struct nvm_dev *dev, struct nvm_ioctl_create *create)
384384
goto err_dev;
385385
}
386386

387-
tqueue = blk_alloc_queue_node(GFP_KERNEL, dev->q->node);
387+
tqueue = blk_alloc_queue_node(GFP_KERNEL, dev->q->node, NULL);
388388
if (!tqueue) {
389389
ret = -ENOMEM;
390390
goto err_disk;

drivers/md/dm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1841,7 +1841,7 @@ static struct mapped_device *alloc_dev(int minor)
18411841
INIT_LIST_HEAD(&md->table_devices);
18421842
spin_lock_init(&md->uevent_lock);
18431843

1844-
md->queue = blk_alloc_queue_node(GFP_KERNEL, numa_node_id);
1844+
md->queue = blk_alloc_queue_node(GFP_KERNEL, numa_node_id, NULL);
18451845
if (!md->queue)
18461846
goto bad;
18471847
md->queue->queuedata = md;

drivers/nvdimm/pmem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ static int pmem_attach_disk(struct device *dev,
344344
return -EBUSY;
345345
}
346346

347-
q = blk_alloc_queue_node(GFP_KERNEL, dev_to_node(dev));
347+
q = blk_alloc_queue_node(GFP_KERNEL, dev_to_node(dev), NULL);
348348
if (!q)
349349
return -ENOMEM;
350350

drivers/nvme/host/multipath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
162162
if (!(ctrl->subsys->cmic & (1 << 1)) || !multipath)
163163
return 0;
164164

165-
q = blk_alloc_queue_node(GFP_KERNEL, NUMA_NO_NODE);
165+
q = blk_alloc_queue_node(GFP_KERNEL, NUMA_NO_NODE, NULL);
166166
if (!q)
167167
goto out;
168168
q->queuedata = head;

drivers/scsi/scsi_lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2223,7 +2223,7 @@ struct request_queue *scsi_old_alloc_queue(struct scsi_device *sdev)
22232223
struct Scsi_Host *shost = sdev->host;
22242224
struct request_queue *q;
22252225

2226-
q = blk_alloc_queue_node(GFP_KERNEL, NUMA_NO_NODE);
2226+
q = blk_alloc_queue_node(GFP_KERNEL, NUMA_NO_NODE, NULL);
22272227
if (!q)
22282228
return NULL;
22292229
q->cmd_size = sizeof(struct scsi_cmnd) + shost->hostt->cmd_size;

include/linux/blkdev.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,8 @@ extern long nr_blockdev_pages(void);
13211321

13221322
bool __must_check blk_get_queue(struct request_queue *);
13231323
struct request_queue *blk_alloc_queue(gfp_t);
1324-
struct request_queue *blk_alloc_queue_node(gfp_t, int);
1324+
struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id,
1325+
spinlock_t *lock);
13251326
extern void blk_put_queue(struct request_queue *);
13261327
extern void blk_set_queue_dying(struct request_queue *);
13271328

0 commit comments

Comments
 (0)