diff options
-rw-r--r-- | net/rds/connection.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/rds/connection.c b/net/rds/connection.c index 519b4fe962b6..870992e08cae 100644 --- a/net/rds/connection.c +++ b/net/rds/connection.c | |||
@@ -336,6 +336,10 @@ void rds_conn_destroy(struct rds_connection *conn) | |||
336 | rds_conn_drop(conn); | 336 | rds_conn_drop(conn); |
337 | flush_work(&conn->c_down_w); | 337 | flush_work(&conn->c_down_w); |
338 | 338 | ||
339 | /* make sure lingering queued work won't try to ref the conn */ | ||
340 | cancel_delayed_work_sync(&conn->c_send_w); | ||
341 | cancel_delayed_work_sync(&conn->c_recv_w); | ||
342 | |||
339 | /* tear down queued messages */ | 343 | /* tear down queued messages */ |
340 | list_for_each_entry_safe(rm, rtmp, | 344 | list_for_each_entry_safe(rm, rtmp, |
341 | &conn->c_send_queue, | 345 | &conn->c_send_queue, |