Skip to content

Commit 8df2025

Browse files
author
Christoph Hellwig
committed
nvmet: don't look at the request_queue in nvmet_bdev_zone_mgmt_emulate_all
nvmet is a consumer of the block layer and should not directly look at the request_queue. Just use the NUMA node ID from the gendisk instead of the request_queue. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Keith Busch <[email protected]>
1 parent fe6f04c commit 8df2025

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/nvme/target/zns.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,6 @@ static u16 nvmet_bdev_zone_mgmt_emulate_all(struct nvmet_req *req)
387387
{
388388
struct block_device *bdev = req->ns->bdev;
389389
unsigned int nr_zones = bdev_nr_zones(bdev);
390-
struct request_queue *q = bdev_get_queue(bdev);
391390
struct bio *bio = NULL;
392391
sector_t sector = 0;
393392
int ret;
@@ -396,7 +395,7 @@ static u16 nvmet_bdev_zone_mgmt_emulate_all(struct nvmet_req *req)
396395
};
397396

398397
d.zbitmap = kcalloc_node(BITS_TO_LONGS(nr_zones), sizeof(*(d.zbitmap)),
399-
GFP_NOIO, q->node);
398+
GFP_NOIO, bdev->bd_disk->node_id);
400399
if (!d.zbitmap) {
401400
ret = -ENOMEM;
402401
goto out;

0 commit comments

Comments
 (0)