Skip to content

Commit

Permalink
rds: ib: drop unnecessary rdma_reject
Browse files Browse the repository at this point in the history
When rdma_accept fails, rdma_reject is called in it. As such, it is
not necessary to execute rdma_reject again.

Cc: Joe Jin <joe.jin@oracle.com>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Zhu Yanjun authored and David S. Miller committed Mar 14, 2017
1 parent 62a9fa0 commit b418c52
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/rds/ib_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,9 +677,8 @@ int rds_ib_cm_handle_connect(struct rdma_cm_id *cm_id,
event->param.conn.initiator_depth);

/* rdma_accept() calls rdma_reject() internally if it fails */
err = rdma_accept(cm_id, &conn_param);
if (err)
rds_ib_conn_error(conn, "rdma_accept failed (%d)\n", err);
if (rdma_accept(cm_id, &conn_param))
rds_ib_conn_error(conn, "rdma_accept failed\n");

out:
if (conn)
Expand Down

0 comments on commit b418c52

Please sign in to comment.