diff --git a/[refs] b/[refs] index 84e08c5d55c0..3fd637d5dbce 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5adb5bc65f93e52341c3fc9d03d4030dd375e256 +refs/heads/master: ffcec0e110c198717eb0f6ac000c1e5397db9451 diff --git a/trunk/net/rds/connection.c b/trunk/net/rds/connection.c index 968b7a798398..519b4fe962b6 100644 --- a/trunk/net/rds/connection.c +++ b/trunk/net/rds/connection.c @@ -312,6 +312,10 @@ void rds_conn_shutdown(struct rds_connection *conn) /* * Stop and free a connection. + * + * This can only be used in very limited circumstances. It assumes that once + * the conn has been shutdown that no one else is referencing the connection. + * We can only ensure this in the rmmod path in the current code. */ void rds_conn_destroy(struct rds_connection *conn) { @@ -326,10 +330,11 @@ void rds_conn_destroy(struct rds_connection *conn) spin_lock_irq(&rds_conn_lock); hlist_del_init_rcu(&conn->c_hash_node); spin_unlock_irq(&rds_conn_lock); - synchronize_rcu(); - rds_conn_shutdown(conn); + /* shut the connection down */ + rds_conn_drop(conn); + flush_work(&conn->c_down_w); /* tear down queued messages */ list_for_each_entry_safe(rm, rtmp,