Skip to content

Commit

Permalink
RDS: cancel connection work structs as we shut down
Browse files Browse the repository at this point in the history
Nothing was canceling the send and receive work that might have been
queued as a conn was being destroyed.

Signed-off-by: Zach Brown <zach.brown@oracle.com>
  • Loading branch information
Zach Brown authored and Andy Grover committed Sep 9, 2010
1 parent ffcec0e commit 4518071
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/rds/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ void rds_conn_destroy(struct rds_connection *conn)
rds_conn_drop(conn);
flush_work(&conn->c_down_w);

/* make sure lingering queued work won't try to ref the conn */
cancel_delayed_work_sync(&conn->c_send_w);
cancel_delayed_work_sync(&conn->c_recv_w);

/* tear down queued messages */
list_for_each_entry_safe(rm, rtmp,
&conn->c_send_queue,
Expand Down

0 comments on commit 4518071

Please sign in to comment.