Commit e507210a authored by Guoqing Jiang's avatar Guoqing Jiang Committed by Jens Axboe

rnbd-clt: make rnbd_clt_change_capacity return void

No need to checking the return value, make it return void.
Acked-by: default avatarJack Wang <jinpu.wang@ionos.com>
Signed-off-by: default avatarGuoqing Jiang <guoqing.jiang@linux.dev>
Link: https://lore.kernel.org/r/20220706133152.12058-9-guoqing.jiang@linux.devSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent ae2dfd1d
...@@ -68,11 +68,11 @@ static inline bool rnbd_clt_get_dev(struct rnbd_clt_dev *dev) ...@@ -68,11 +68,11 @@ static inline bool rnbd_clt_get_dev(struct rnbd_clt_dev *dev)
return refcount_inc_not_zero(&dev->refcount); return refcount_inc_not_zero(&dev->refcount);
} }
static int rnbd_clt_change_capacity(struct rnbd_clt_dev *dev, static void rnbd_clt_change_capacity(struct rnbd_clt_dev *dev,
sector_t new_nsectors) sector_t new_nsectors)
{ {
if (get_capacity(dev->gd) == new_nsectors) if (get_capacity(dev->gd) == new_nsectors)
return 0; return;
/* /*
* If the size changed, we need to revalidate it * If the size changed, we need to revalidate it
...@@ -80,7 +80,6 @@ static int rnbd_clt_change_capacity(struct rnbd_clt_dev *dev, ...@@ -80,7 +80,6 @@ static int rnbd_clt_change_capacity(struct rnbd_clt_dev *dev,
rnbd_clt_info(dev, "Device size changed from %llu to %llu sectors\n", rnbd_clt_info(dev, "Device size changed from %llu to %llu sectors\n",
get_capacity(dev->gd), new_nsectors); get_capacity(dev->gd), new_nsectors);
set_capacity_and_notify(dev->gd, new_nsectors); set_capacity_and_notify(dev->gd, new_nsectors);
return 0;
} }
static int process_msg_open_rsp(struct rnbd_clt_dev *dev, static int process_msg_open_rsp(struct rnbd_clt_dev *dev,
...@@ -127,7 +126,7 @@ int rnbd_clt_resize_disk(struct rnbd_clt_dev *dev, sector_t newsize) ...@@ -127,7 +126,7 @@ int rnbd_clt_resize_disk(struct rnbd_clt_dev *dev, sector_t newsize)
ret = -ENOENT; ret = -ENOENT;
goto out; goto out;
} }
ret = rnbd_clt_change_capacity(dev, newsize); rnbd_clt_change_capacity(dev, newsize);
out: out:
mutex_unlock(&dev->lock); mutex_unlock(&dev->lock);
......
Markdown is supported
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