diff options
author | David S. Miller <davem@davemloft.net> | 2018-10-13 00:38:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-13 00:38:46 -0400 |
commit | d864991b220b7c62e81d21209e1fd978fd67352c (patch) | |
tree | b570a1ad6fc1b959c5bcda6ceca0b321319c01e0 /net/rds/send.c | |
parent | a688c53a0277d8ea21d86a5c56884892e3442c5e (diff) | |
parent | bab5c80b211035739997ebd361a679fa85b39465 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts were easy to resolve using immediate context mostly,
except the cls_u32.c one where I simply too the entire HEAD
chunk.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/send.c')
-rw-r--r-- | net/rds/send.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/net/rds/send.c b/net/rds/send.c index 57b3d5a8b2db..fe785ee819dd 100644 --- a/net/rds/send.c +++ b/net/rds/send.c | |||
@@ -1007,7 +1007,8 @@ static int rds_cmsg_send(struct rds_sock *rs, struct rds_message *rm, | |||
1007 | return ret; | 1007 | return ret; |
1008 | } | 1008 | } |
1009 | 1009 | ||
1010 | static int rds_send_mprds_hash(struct rds_sock *rs, struct rds_connection *conn) | 1010 | static int rds_send_mprds_hash(struct rds_sock *rs, |
1011 | struct rds_connection *conn, int nonblock) | ||
1011 | { | 1012 | { |
1012 | int hash; | 1013 | int hash; |
1013 | 1014 | ||
@@ -1023,10 +1024,16 @@ static int rds_send_mprds_hash(struct rds_sock *rs, struct rds_connection *conn) | |||
1023 | * used. But if we are interrupted, we have to use the zero | 1024 | * used. But if we are interrupted, we have to use the zero |
1024 | * c_path in case the connection ends up being non-MP capable. | 1025 | * c_path in case the connection ends up being non-MP capable. |
1025 | */ | 1026 | */ |
1026 | if (conn->c_npaths == 0) | 1027 | if (conn->c_npaths == 0) { |
1028 | /* Cannot wait for the connection be made, so just use | ||
1029 | * the base c_path. | ||
1030 | */ | ||
1031 | if (nonblock) | ||
1032 | return 0; | ||
1027 | if (wait_event_interruptible(conn->c_hs_waitq, | 1033 | if (wait_event_interruptible(conn->c_hs_waitq, |
1028 | conn->c_npaths != 0)) | 1034 | conn->c_npaths != 0)) |
1029 | hash = 0; | 1035 | hash = 0; |
1036 | } | ||
1030 | if (conn->c_npaths == 1) | 1037 | if (conn->c_npaths == 1) |
1031 | hash = 0; | 1038 | hash = 0; |
1032 | } | 1039 | } |
@@ -1256,7 +1263,7 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len) | |||
1256 | } | 1263 | } |
1257 | 1264 | ||
1258 | if (conn->c_trans->t_mp_capable) | 1265 | if (conn->c_trans->t_mp_capable) |
1259 | cpath = &conn->c_path[rds_send_mprds_hash(rs, conn)]; | 1266 | cpath = &conn->c_path[rds_send_mprds_hash(rs, conn, nonblock)]; |
1260 | else | 1267 | else |
1261 | cpath = &conn->c_path[0]; | 1268 | cpath = &conn->c_path[0]; |
1262 | 1269 | ||