diff options
author | Chris Mason <chris.mason@oracle.com> | 2010-05-11 18:11:11 -0400 |
---|---|---|
committer | Andy Grover <andy.grover@oracle.com> | 2010-09-08 21:15:09 -0400 |
commit | 7e3f2952eeb1a0fe2aa9882fd1705a88f9d89b35 (patch) | |
tree | 903d89d0d1184bd1f33df2b5036615d1c40cfb06 /net/rds/rds.h | |
parent | 38a4e5e61344490f18241333d7b1b368a3a38748 (diff) |
rds: don't let RDS shutdown a connection while senders are present
This is the first in a long line of patches that tries to fix races
between RDS connection shutdown and RDS traffic.
Here we are maintaining a count of active senders to make sure
the connection doesn't go away while they are using it.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'net/rds/rds.h')
-rw-r--r-- | net/rds/rds.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/rds/rds.h b/net/rds/rds.h index 241a0859d16e..4ab3d1aa0237 100644 --- a/net/rds/rds.h +++ b/net/rds/rds.h | |||
@@ -93,6 +93,7 @@ struct rds_connection { | |||
93 | 93 | ||
94 | spinlock_t c_send_lock; /* protect send ring */ | 94 | spinlock_t c_send_lock; /* protect send ring */ |
95 | atomic_t c_send_generation; | 95 | atomic_t c_send_generation; |
96 | atomic_t c_senders; | ||
96 | struct rds_message *c_xmit_rm; | 97 | struct rds_message *c_xmit_rm; |
97 | unsigned long c_xmit_sg; | 98 | unsigned long c_xmit_sg; |
98 | unsigned int c_xmit_hdr_off; | 99 | unsigned int c_xmit_hdr_off; |