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/ib_recv.c | |
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/ib_recv.c')
-rw-r--r-- | net/rds/ib_recv.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c index 8f041f7954a2..24d14615f41a 100644 --- a/net/rds/ib_recv.c +++ b/net/rds/ib_recv.c | |||
@@ -863,18 +863,6 @@ int rds_ib_recv(struct rds_connection *conn) | |||
863 | int ret = 0; | 863 | int ret = 0; |
864 | 864 | ||
865 | rdsdebug("conn %p\n", conn); | 865 | rdsdebug("conn %p\n", conn); |
866 | |||
867 | /* | ||
868 | * If we get a temporary posting failure in this context then | ||
869 | * we're really low and we want the caller to back off for a bit. | ||
870 | */ | ||
871 | mutex_lock(&ic->i_recv_mutex); | ||
872 | if (rds_ib_recv_refill(conn, 0)) | ||
873 | ret = -ENOMEM; | ||
874 | else | ||
875 | rds_ib_stats_inc(s_ib_rx_refill_from_thread); | ||
876 | mutex_unlock(&ic->i_recv_mutex); | ||
877 | |||
878 | if (rds_conn_up(conn)) | 866 | if (rds_conn_up(conn)) |
879 | rds_ib_attempt_ack(ic); | 867 | rds_ib_attempt_ack(ic); |
880 | 868 | ||