summaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-02-15 08:10:47 +0100
committerJens Axboe <axboe@kernel.dk>2024-02-19 16:58:23 -0700
commit74fa8f9c553f7b5ccab7d103acae63cc2e080465 (patch)
tree57800cbcef0bc3fe5dde4dd233bb1c006d0c4deb /arch/m68k
parent31edf4bbe0ba27fd03ac7d87eb2ee3d2a231af6d (diff)
downloadlinux-stable-74fa8f9c553f7b5ccab7d103acae63cc2e080465.tar.gz
linux-stable-74fa8f9c553f7b5ccab7d103acae63cc2e080465.tar.bz2
linux-stable-74fa8f9c553f7b5ccab7d103acae63cc2e080465.zip
block: pass a queue_limits argument to blk_alloc_disk
Pass a queue_limits to blk_alloc_disk and apply it if non-NULL. This will allow allocating queues with valid queue limits instead of setting the values one at a time later. Also change blk_alloc_disk to return an ERR_PTR instead of just NULL which can't distinguish errors. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Link: https://lore.kernel.org/r/20240215071055.2201424-2-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/emu/nfblock.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/m68k/emu/nfblock.c b/arch/m68k/emu/nfblock.c
index a708fbd5a844..539ff56b6968 100644
--- a/arch/m68k/emu/nfblock.c
+++ b/arch/m68k/emu/nfblock.c
@@ -117,9 +117,11 @@ static int __init nfhd_init_one(int id, u32 blocks, u32 bsize)
dev->bsize = bsize;
dev->bshift = ffs(bsize) - 10;
- dev->disk = blk_alloc_disk(NUMA_NO_NODE);
- if (!dev->disk)
+ dev->disk = blk_alloc_disk(NULL, NUMA_NO_NODE);
+ if (IS_ERR(dev->disk)) {
+ err = PTR_ERR(dev->disk);
goto free_dev;
+ }
dev->disk->major = major_num;
dev->disk->first_minor = dev_id * 16;