diff options
Diffstat (limited to 'net/rds/recv.c')
-rw-r--r-- | net/rds/recv.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/rds/recv.c b/net/rds/recv.c index c93588c2d553..68800f02aa30 100644 --- a/net/rds/recv.c +++ b/net/rds/recv.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/in.h> | 36 | #include <linux/in.h> |
37 | 37 | ||
38 | #include "rds.h" | 38 | #include "rds.h" |
39 | #include "rdma.h" | ||
40 | 39 | ||
41 | void rds_inc_init(struct rds_incoming *inc, struct rds_connection *conn, | 40 | void rds_inc_init(struct rds_incoming *inc, struct rds_connection *conn, |
42 | __be32 saddr) | 41 | __be32 saddr) |
@@ -210,7 +209,7 @@ void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr, | |||
210 | } | 209 | } |
211 | 210 | ||
212 | rs = rds_find_bound(daddr, inc->i_hdr.h_dport); | 211 | rs = rds_find_bound(daddr, inc->i_hdr.h_dport); |
213 | if (rs == NULL) { | 212 | if (!rs) { |
214 | rds_stats_inc(s_recv_drop_no_sock); | 213 | rds_stats_inc(s_recv_drop_no_sock); |
215 | goto out; | 214 | goto out; |
216 | } | 215 | } |
@@ -251,7 +250,7 @@ static int rds_next_incoming(struct rds_sock *rs, struct rds_incoming **inc) | |||
251 | { | 250 | { |
252 | unsigned long flags; | 251 | unsigned long flags; |
253 | 252 | ||
254 | if (*inc == NULL) { | 253 | if (!*inc) { |
255 | read_lock_irqsave(&rs->rs_recv_lock, flags); | 254 | read_lock_irqsave(&rs->rs_recv_lock, flags); |
256 | if (!list_empty(&rs->rs_recv_queue)) { | 255 | if (!list_empty(&rs->rs_recv_queue)) { |
257 | *inc = list_entry(rs->rs_recv_queue.next, | 256 | *inc = list_entry(rs->rs_recv_queue.next, |
@@ -334,10 +333,10 @@ int rds_notify_queue_get(struct rds_sock *rs, struct msghdr *msghdr) | |||
334 | 333 | ||
335 | if (msghdr) { | 334 | if (msghdr) { |
336 | cmsg.user_token = notifier->n_user_token; | 335 | cmsg.user_token = notifier->n_user_token; |
337 | cmsg.status = notifier->n_status; | 336 | cmsg.status = notifier->n_status; |
338 | 337 | ||
339 | err = put_cmsg(msghdr, SOL_RDS, RDS_CMSG_RDMA_STATUS, | 338 | err = put_cmsg(msghdr, SOL_RDS, RDS_CMSG_RDMA_STATUS, |
340 | sizeof(cmsg), &cmsg); | 339 | sizeof(cmsg), &cmsg); |
341 | if (err) | 340 | if (err) |
342 | break; | 341 | break; |
343 | } | 342 | } |