Skip to content

Commit

Permalink
rds: Remove kfreed tcp conn from list
Browse files Browse the repository at this point in the history
All the rds_tcp_connection objects are stored list, but when
being freed it should be removed from there.

Signed-off-by: Pavel Emelyanov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
xemul authored and davem330 committed Nov 4, 2010
1 parent 58c490b commit 8200a59
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/rds/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,13 @@ static int rds_tcp_conn_alloc(struct rds_connection *conn, gfp_t gfp)
static void rds_tcp_conn_free(void *arg)
{
struct rds_tcp_connection *tc = arg;
unsigned long flags;
rdsdebug("freeing tc %p\n", tc);

spin_lock_irqsave(&rds_tcp_conn_lock, flags);
list_del(&tc->t_tcp_node);
spin_unlock_irqrestore(&rds_tcp_conn_lock, flags);

kmem_cache_free(rds_tcp_conn_slab, tc);
}

Expand Down

0 comments on commit 8200a59

Please sign in to comment.