diff options
Diffstat (limited to 'net/ceph')
-rw-r--r-- | net/ceph/messenger.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index ad93342c90d7..5c4e85296cf6 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -2530,6 +2530,11 @@ static int try_write(struct ceph_connection *con) int ret = 1; dout("try_write start %p state %lu\n", con, con->state); + if (con->state != CON_STATE_PREOPEN && + con->state != CON_STATE_CONNECTING && + con->state != CON_STATE_NEGOTIATING && + con->state != CON_STATE_OPEN) + return 0; more: dout("try_write out_kvec_bytes %d\n", con->out_kvec_bytes); @@ -2555,6 +2560,8 @@ more: } more_kvec: + BUG_ON(!con->sock); + /* kvec data queued? */ if (con->out_kvec_left) { ret = write_partial_kvec(con); |