mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-28 13:34:38 +08:00
RDMA/rtrs-clt: Remove redundant code from rtrs_clt_read_req
There is no need to dereference 's' from 'sess', since we have "sess = to_clt_sess(s)" before. And we can deference 'dev' from 's' earlier. Link: https://lore.kernel.org/r/20210325153308.1214057-8-gi-oh.kim@ionos.com Signed-off-by: Guoqing Jiang <guoqing.jiang@ionos.com> Reviewed-by: Danil Kipnis <danil.kipnis@ionos.com> Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com> Signed-off-by: Jack Wang <jinpu.wang@ionos.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
parent
0adb3ad609
commit
44930991f2
@ -1052,7 +1052,7 @@ static int rtrs_clt_read_req(struct rtrs_clt_io_req *req)
|
||||
struct rtrs_sess *s = con->c.sess;
|
||||
struct rtrs_clt_sess *sess = to_clt_sess(s);
|
||||
struct rtrs_msg_rdma_read *msg;
|
||||
struct rtrs_ib_dev *dev;
|
||||
struct rtrs_ib_dev *dev = sess->s.dev;
|
||||
|
||||
struct ib_reg_wr rwr;
|
||||
struct ib_send_wr *wr = NULL;
|
||||
@ -1062,9 +1062,6 @@ static int rtrs_clt_read_req(struct rtrs_clt_io_req *req)
|
||||
|
||||
const size_t tsize = sizeof(*msg) + req->data_len + req->usr_len;
|
||||
|
||||
s = &sess->s;
|
||||
dev = sess->s.dev;
|
||||
|
||||
if (unlikely(tsize > sess->chunk_size)) {
|
||||
rtrs_wrn(s,
|
||||
"Read request failed, message size is %zu, bigger than CHUNK_SIZE %d\n",
|
||||
|
Loading…
Reference in New Issue
Block a user