mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-03 08:04:58 +01:00
net/rds: fix WARNING in rds_conn_connect_if_down
If connection isn't established yet, get_mr() will fail, trigger connection after
get_mr().
Fixes: 584a8279a4 ("RDS: RDMA: return appropriate error on rdma map failures")
Reported-and-tested-by: [email protected]
Signed-off-by: Edward Adam Davis <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
1 parent
f287d6aafd
commit
c055fc00c0
2 files changed
+4
-5
No files matched your search
@@ -301,6 +301,9 @@ static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args,
|
||||
kfree(sg);
|
||||
}
|
||||
ret = PTR_ERR(trans_private);
|
||||
/* Trigger connection so that its ready for the next retry */
|
||||
if (ret == -ENODEV)
|
||||
rds_conn_connect_if_down(cp->cp_conn);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
+1
-5
@@ -1313,12 +1313,8 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len)
|
||||
|
||||
/* Parse any control messages the user may have included. */
|
||||
ret = rds_cmsg_send(rs, rm, msg, &allocated_mr, &vct);
|
||||
if (ret) {
|
||||
/* Trigger connection so that its ready for the next retry */
|
||||
if (ret == -EAGAIN)
|
||||
rds_conn_connect_if_down(conn);
|
||||
if (ret)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (rm->rdma.op_active && !conn->c_trans->xmit_rdma) {
|
||||
printk_ratelimited(KERN_NOTICE "rdma_op %p conn xmit_rdma %p\n",
|
||||
|
||||
Reference in new issue
Block a user