aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2012-07-20 18:40:04 -0400
committerSage Weil <sage@inktank.com>2012-07-30 21:15:58 -0400
commit2e8cb10063820af7ed7638e3fd9013eee21266e7 (patch)
treef871b278cdb099d4fe152366e5e09bbcb65deffd /net
parenta59b55a602b6c741052d79c1e3643f8440cddd27 (diff)
libceph: drop gratuitous socket close calls in con_work
If the state is CLOSED or OPENING, we shouldn't have a socket. Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'net')
-rw-r--r--net/ceph/messenger.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 20e60a80bc29..32ab7cd089a3 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -2284,15 +2284,15 @@ restart:
2284 dout("con_work %p STANDBY\n", con); 2284 dout("con_work %p STANDBY\n", con);
2285 goto done; 2285 goto done;
2286 } 2286 }
2287 if (test_bit(CLOSED, &con->state)) { /* e.g. if we are replaced */ 2287 if (test_bit(CLOSED, &con->state)) {
2288 dout("con_work CLOSED\n"); 2288 dout("con_work %p CLOSED\n", con);
2289 con_close_socket(con); 2289 BUG_ON(con->sock);
2290 goto done; 2290 goto done;
2291 } 2291 }
2292 if (test_and_clear_bit(OPENING, &con->state)) { 2292 if (test_and_clear_bit(OPENING, &con->state)) {
2293 /* reopen w/ new peer */ 2293 /* reopen w/ new peer */
2294 dout("con_work OPENING\n"); 2294 dout("con_work OPENING\n");
2295 con_close_socket(con); 2295 BUG_ON(con->sock);
2296 } 2296 }
2297 2297
2298 ret = try_read(con); 2298 ret = try_read(con);