linux/drivers/block
Guoqing Jiang 94fa550b95 block/rnbd-clt: fix wrong max ID in ida_alloc_max
[ Upstream commit 9d6033e350 ]

We need to pass 'end - 1' to ida_alloc_max after switch from
ida_simple_get to ida_alloc_max.

Otherwise smatch warns.

drivers/block/rnbd/rnbd-clt.c:1460 init_dev() error: Calling ida_alloc_max() with a 'max' argument which is a power of 2. -1 missing?

Fixes: 24afc15dbe ("block/rnbd: Remove a useless mutex")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Acked-by: Jack Wang <jinpu.wang@ionos.com>
Link: https://lore.kernel.org/r/20221230010926.32243-1-guoqing.jiang@linux.dev
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-01 08:34:21 +01:00
..
aoe
drbd block: handle bio_split_to_limits() NULL return 2023-01-18 11:58:33 +01:00
mtip32xx
null_blk
paride
rnbd block/rnbd-clt: fix wrong max ID in ida_alloc_max 2023-02-01 08:34:21 +01:00
xen-blkback
zram
amiflop.c
ataflop.c
brd.c
floppy.c floppy: Fix memory leak in do_floppy_init() 2022-12-31 13:33:11 +01:00
Kconfig ublk_drv: comment on ublk_driver entry of Kconfig 2022-10-31 07:23:24 -06:00
loop.c loop: Fix the max_loop commandline argument treatment when it is set to 0 2022-12-31 13:33:10 +01:00
Makefile
n64cart.c
nbd.c
pktcdvd.c pktcdvd: check for NULL returna fter calling bio_split_to_limits() 2023-01-24 07:24:37 +01:00
ps3disk.c
ps3vram.c block: handle bio_split_to_limits() NULL return 2023-01-18 11:58:33 +01:00
rbd_types.h
rbd.c
sunvdc.c
swim_asm.S
swim.c
swim3.c
ublk_drv.c ublk: honor IO_URING_F_NONBLOCK for handling control command 2023-01-12 12:02:32 +01:00
virtio_blk.c virtio_blk: Fix signedness bug in virtblk_prep_rq() 2023-01-12 12:02:54 +01:00
xen-blkfront.c
z2ram.c