rnbd-clt: check capacity inside rnbd_clt_change_capacity
authorGuoqing Jiang <guoqing.jiang@linux.dev>
Wed, 6 Jul 2022 13:31:50 +0000 (21:31 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 6 Jul 2022 13:38:40 +0000 (07:38 -0600)
commitffa41a71702493b9145a5ae4f4b1b8a4bab1b8f7
tree26deb73fe138f270d1350891e072d5110ef7764f
parent50aff97483b6afe4a9796154e9f6a5ca0a4f55c2
rnbd-clt: check capacity inside rnbd_clt_change_capacity

Currently, process_msg_open_rsp checks if capacity changed or not before
call rnbd_clt_change_capacity while the checking also make sense for
rnbd_clt_resize_dev_store, let's move the checking into the function.

Acked-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Link: https://lore.kernel.org/r/20220706133152.12058-7-guoqing.jiang@linux.dev
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/rnbd/rnbd-clt.c