aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph
diff options
context:
space:
mode:
Diffstat (limited to 'net/ceph')
-rw-r--r--net/ceph/osd_client.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index ca79cad50840..e0887923e5ab 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -91,15 +91,10 @@ void ceph_osdc_release_request(struct kref *kref)
91 91
92 if (req->r_request) 92 if (req->r_request)
93 ceph_msg_put(req->r_request); 93 ceph_msg_put(req->r_request);
94 if (req->r_con_filling_msg) { 94 if (req->r_reply) {
95 dout("%s revoking msg %p from con %p\n", __func__,
96 req->r_reply, req->r_con_filling_msg);
97 ceph_msg_revoke_incoming(req->r_reply); 95 ceph_msg_revoke_incoming(req->r_reply);
98 req->r_con_filling_msg->ops->put(req->r_con_filling_msg);
99 req->r_con_filling_msg = NULL;
100 }
101 if (req->r_reply)
102 ceph_msg_put(req->r_reply); 96 ceph_msg_put(req->r_reply);
97 }
103 98
104 if (req->r_data_in.type == CEPH_OSD_DATA_TYPE_PAGES && 99 if (req->r_data_in.type == CEPH_OSD_DATA_TYPE_PAGES &&
105 req->r_data_in.own_pages) { 100 req->r_data_in.own_pages) {
@@ -1353,16 +1348,6 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg,
1353 for (i = 0; i < numops; i++) 1348 for (i = 0; i < numops; i++)
1354 req->r_reply_op_result[i] = ceph_decode_32(&p); 1349 req->r_reply_op_result[i] = ceph_decode_32(&p);
1355 1350
1356 /*
1357 * if this connection filled our message, drop our reference now, to
1358 * avoid a (safe but slower) revoke later.
1359 */
1360 if (req->r_con_filling_msg == con && req->r_reply == msg) {
1361 dout(" dropping con_filling_msg ref %p\n", con);
1362 req->r_con_filling_msg = NULL;
1363 con->ops->put(con);
1364 }
1365
1366 if (!req->r_got_reply) { 1351 if (!req->r_got_reply) {
1367 unsigned int bytes; 1352 unsigned int bytes;
1368 1353
@@ -2199,13 +2184,10 @@ static struct ceph_msg *get_reply(struct ceph_connection *con,
2199 goto out; 2184 goto out;
2200 } 2185 }
2201 2186
2202 if (req->r_con_filling_msg) { 2187 if (req->r_reply->con)
2203 dout("%s revoking msg %p from old con %p\n", __func__, 2188 dout("%s revoking msg %p from old con %p\n", __func__,
2204 req->r_reply, req->r_con_filling_msg); 2189 req->r_reply, req->r_reply->con);
2205 ceph_msg_revoke_incoming(req->r_reply); 2190 ceph_msg_revoke_incoming(req->r_reply);
2206 req->r_con_filling_msg->ops->put(req->r_con_filling_msg);
2207 req->r_con_filling_msg = NULL;
2208 }
2209 2191
2210 if (front > req->r_reply->front.iov_len) { 2192 if (front > req->r_reply->front.iov_len) {
2211 pr_warning("get_reply front %d > preallocated %d\n", 2193 pr_warning("get_reply front %d > preallocated %d\n",
@@ -2236,7 +2218,6 @@ static struct ceph_msg *get_reply(struct ceph_connection *con,
2236 } 2218 }
2237 } 2219 }
2238 *skip = 0; 2220 *skip = 0;
2239 req->r_con_filling_msg = con->ops->get(con);
2240 dout("get_reply tid %lld %p\n", tid, m); 2221 dout("get_reply tid %lld %p\n", tid, m);
2241 2222
2242out: 2223out: