Commit 46a99e0c authored by Guoqing Jiang's avatar Guoqing Jiang Committed by Jens Axboe

block/rnbd-clt: remove nr argument from send_usr_msg

The argument is not needed since all callers pass 1 for it.
Signed-off-by: default avatarGuoqing Jiang <guoqing.jiang@cloud.ionos.com>
Signed-off-by: default avatarJack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 029f56db
...@@ -427,7 +427,7 @@ enum wait_type { ...@@ -427,7 +427,7 @@ enum wait_type {
}; };
static int send_usr_msg(struct rtrs_clt *rtrs, int dir, static int send_usr_msg(struct rtrs_clt *rtrs, int dir,
struct rnbd_iu *iu, struct kvec *vec, size_t nr, struct rnbd_iu *iu, struct kvec *vec,
size_t len, struct scatterlist *sg, unsigned int sg_len, size_t len, struct scatterlist *sg, unsigned int sg_len,
void (*conf)(struct work_struct *work), void (*conf)(struct work_struct *work),
int *errno, enum wait_type wait) int *errno, enum wait_type wait)
...@@ -441,7 +441,7 @@ static int send_usr_msg(struct rtrs_clt *rtrs, int dir, ...@@ -441,7 +441,7 @@ static int send_usr_msg(struct rtrs_clt *rtrs, int dir,
.conf_fn = msg_conf, .conf_fn = msg_conf,
}; };
err = rtrs_clt_request(dir, &req_ops, rtrs, iu->permit, err = rtrs_clt_request(dir, &req_ops, rtrs, iu->permit,
vec, nr, len, sg, sg_len); vec, 1, len, sg, sg_len);
if (!err && wait) { if (!err && wait) {
wait_event(iu->comp.wait, iu->comp.errno != INT_MAX); wait_event(iu->comp.wait, iu->comp.errno != INT_MAX);
*errno = iu->comp.errno; *errno = iu->comp.errno;
...@@ -486,7 +486,7 @@ static int send_msg_close(struct rnbd_clt_dev *dev, u32 device_id, bool wait) ...@@ -486,7 +486,7 @@ static int send_msg_close(struct rnbd_clt_dev *dev, u32 device_id, bool wait)
msg.device_id = cpu_to_le32(device_id); msg.device_id = cpu_to_le32(device_id);
WARN_ON(!rnbd_clt_get_dev(dev)); WARN_ON(!rnbd_clt_get_dev(dev));
err = send_usr_msg(sess->rtrs, WRITE, iu, &vec, 1, 0, NULL, 0, err = send_usr_msg(sess->rtrs, WRITE, iu, &vec, 0, NULL, 0,
msg_close_conf, &errno, wait); msg_close_conf, &errno, wait);
if (err) { if (err) {
rnbd_clt_put_dev(dev); rnbd_clt_put_dev(dev);
...@@ -575,7 +575,7 @@ static int send_msg_open(struct rnbd_clt_dev *dev, bool wait) ...@@ -575,7 +575,7 @@ static int send_msg_open(struct rnbd_clt_dev *dev, bool wait)
WARN_ON(!rnbd_clt_get_dev(dev)); WARN_ON(!rnbd_clt_get_dev(dev));
err = send_usr_msg(sess->rtrs, READ, iu, err = send_usr_msg(sess->rtrs, READ, iu,
&vec, 1, sizeof(*rsp), iu->sglist, 1, &vec, sizeof(*rsp), iu->sglist, 1,
msg_open_conf, &errno, wait); msg_open_conf, &errno, wait);
if (err) { if (err) {
rnbd_clt_put_dev(dev); rnbd_clt_put_dev(dev);
...@@ -629,7 +629,7 @@ static int send_msg_sess_info(struct rnbd_clt_session *sess, bool wait) ...@@ -629,7 +629,7 @@ static int send_msg_sess_info(struct rnbd_clt_session *sess, bool wait)
goto put_iu; goto put_iu;
} }
err = send_usr_msg(sess->rtrs, READ, iu, err = send_usr_msg(sess->rtrs, READ, iu,
&vec, 1, sizeof(*rsp), iu->sglist, 1, &vec, sizeof(*rsp), iu->sglist, 1,
msg_sess_info_conf, &errno, wait); msg_sess_info_conf, &errno, wait);
if (err) { if (err) {
rnbd_clt_put_sess(sess); rnbd_clt_put_sess(sess);
......
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