Skip to content
Commit 9d6033e3 authored by Guoqing Jiang's avatar Guoqing Jiang Committed by Jens Axboe
Browse files

block/rnbd-clt: fix wrong max ID in ida_alloc_max



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: 24afc15d ("block/rnbd: Remove a useless mutex")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarGuoqing Jiang <guoqing.jiang@linux.dev>
Acked-by: default avatarJack Wang <jinpu.wang@ionos.com>
Link: https://lore.kernel.org/r/20221230010926.32243-1-guoqing.jiang@linux.dev


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent e3ff8887
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment