Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159005
b: refs/heads/master
c: edacaea
h: refs/heads/master
i:
  159003: 40b585d
v: v3
  • Loading branch information
Andy Grover authored and David S. Miller committed Jul 20, 2009
1 parent 6fe6f23 commit 9416472
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fdf6e6b4afd8a56fa58f70a3950bd7ea7fbaef5f
refs/heads/master: edacaeae52ade6cbb3a0704db32a9fb4a219dee3
24 changes: 13 additions & 11 deletions trunk/net/rds/recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,26 +409,28 @@ int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
if (msg_flags & MSG_OOB)
goto out;

/* If there are pending notifications, do those - and nothing else */
if (!list_empty(&rs->rs_notify_queue)) {
ret = rds_notify_queue_get(rs, msg);
goto out;
}
while (1) {
/* If there are pending notifications, do those - and nothing else */
if (!list_empty(&rs->rs_notify_queue)) {
ret = rds_notify_queue_get(rs, msg);
break;
}

if (rs->rs_cong_notify) {
ret = rds_notify_cong(rs, msg);
goto out;
}
if (rs->rs_cong_notify) {
ret = rds_notify_cong(rs, msg);
break;
}

while (1) {
if (!rds_next_incoming(rs, &inc)) {
if (nonblock) {
ret = -EAGAIN;
break;
}

timeo = wait_event_interruptible_timeout(*sk->sk_sleep,
rds_next_incoming(rs, &inc),
(!list_empty(&rs->rs_notify_queue)
|| rs->rs_cong_notify
|| rds_next_incoming(rs, &inc)),
timeo);
rdsdebug("recvmsg woke inc %p timeo %ld\n", inc,
timeo);
Expand Down

0 comments on commit 9416472

Please sign in to comment.