aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2010-05-11 18:14:52 -0400
committerAndy Grover <andy.grover@oracle.com>2010-09-08 21:15:11 -0400
commitabf454398c2ebafc629ebb8b149f5a752c79e919 (patch)
tree17c57ca613fc3d8a49f9dfc99bf2f9c3b7e3fc30 /net/rds
parentc9e65383a20d9a656db70efbf67e57f8115ad776 (diff)
RDS: use locking on the connection hash list
rds_conn_destroy really needs locking while it changes the connection hash. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'net/rds')
-rw-r--r--net/rds/connection.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/rds/connection.c b/net/rds/connection.c
index 9c249f394f29..87df15b9f8e4 100644
--- a/net/rds/connection.c
+++ b/net/rds/connection.c
@@ -321,7 +321,10 @@ void rds_conn_destroy(struct rds_connection *conn)
321 "%pI4\n", conn, &conn->c_laddr, 321 "%pI4\n", conn, &conn->c_laddr,
322 &conn->c_faddr); 322 &conn->c_faddr);
323 323
324 /* Ensure conn will not be scheduled for reconnect */
325 spin_lock_irq(&rds_conn_lock);
324 hlist_del_init(&conn->c_hash_node); 326 hlist_del_init(&conn->c_hash_node);
327 spin_unlock_irq(&rds_conn_lock);
325 328
326 /* wait for the rds thread to shut it down */ 329 /* wait for the rds thread to shut it down */
327 atomic_set(&conn->c_state, RDS_CONN_ERROR); 330 atomic_set(&conn->c_state, RDS_CONN_ERROR);