summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2012-07-20 16:45:49 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-26 11:38:40 -0800
commit3b5a9ead0b4845aaa7e80fcd6166f2c6740a1c6f (patch)
treedf27875914d29620a7e921726b8d699267cfadf7
parent1c5b33b852ab372d4538821db998561d5e4d7212 (diff)
downloadlinux-3.10-3b5a9ead0b4845aaa7e80fcd6166f2c6740a1c6f.tar.gz
linux-3.10-3b5a9ead0b4845aaa7e80fcd6166f2c6740a1c6f.tar.bz2
linux-3.10-3b5a9ead0b4845aaa7e80fcd6166f2c6740a1c6f.zip
libceph: close socket directly from ceph_con_close()
(cherry picked from commit ee76e0736db8455e3b11827d6899bd2a4e1d0584) It is simpler to do this immediately, since we already hold the con mutex. It also avoids the need to deal with a not-quite-CLOSED socket in con_work. Signed-off-by: Sage Weil <sage@inktank.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/ceph/messenger.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 7bd757cb01a..49f78ff6247 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -519,14 +519,8 @@ void ceph_con_close(struct ceph_connection *con)
reset_connection(con);
con->peer_global_seq = 0;
cancel_delayed_work(&con->work);
+ con_close_socket(con);
mutex_unlock(&con->mutex);
-
- /*
- * We cannot close the socket directly from here because the
- * work threads use it without holding the mutex. Instead, let
- * con_work() do it.
- */
- queue_con(con);
}
EXPORT_SYMBOL(ceph_con_close);