Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193593
b: refs/heads/master
c: 550a800
h: refs/heads/master
i:
  193591: 890bae9
v: v3
  • Loading branch information
Tina Yang authored and David S. Miller committed Mar 17, 2010
1 parent 0424809 commit a0d40c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 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: 97069788d6784ac92d050557a02f6e7bf4d1f53d
refs/heads/master: 550a8002e4340eaf3bc333e33b59427e9c20272d
13 changes: 7 additions & 6 deletions trunk/net/rds/send.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,6 @@ void rds_send_drop_to(struct rds_sock *rs, struct sockaddr_in *dest)
list_move(&rm->m_sock_item, &list);
rds_send_sndbuf_remove(rs, rm);
clear_bit(RDS_MSG_ON_SOCK, &rm->m_flags);

/* If this is a RDMA operation, notify the app. */
__rds_rdma_send_complete(rs, rm, RDS_RDMA_CANCELED);
}

/* order flag updates with the rs lock */
Expand All @@ -643,16 +640,17 @@ void rds_send_drop_to(struct rds_sock *rs, struct sockaddr_in *dest)

spin_unlock_irqrestore(&rs->rs_lock, flags);

if (wake)
rds_wake_sk_sleep(rs);

conn = NULL;

/* now remove the messages from the conn list as needed */
list_for_each_entry(rm, &list, m_sock_item) {
/* We do this here rather than in the loop above, so that
* we don't have to nest m_rs_lock under rs->rs_lock */
spin_lock_irqsave(&rm->m_rs_lock, flags2);
/* If this is a RDMA operation, notify the app. */
spin_lock(&rs->rs_lock);
__rds_rdma_send_complete(rs, rm, RDS_RDMA_CANCELED);
spin_unlock(&rs->rs_lock);
rm->m_rs = NULL;
spin_unlock_irqrestore(&rm->m_rs_lock, flags2);

Expand Down Expand Up @@ -681,6 +679,9 @@ void rds_send_drop_to(struct rds_sock *rs, struct sockaddr_in *dest)
if (conn)
spin_unlock_irqrestore(&conn->c_lock, flags);

if (wake)
rds_wake_sk_sleep(rs);

while (!list_empty(&list)) {
rm = list_entry(list.next, struct rds_message, m_sock_item);
list_del_init(&rm->m_sock_item);
Expand Down

0 comments on commit a0d40c0

Please sign in to comment.