aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph/osd_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ceph/osd_client.c')
-rw-r--r--net/ceph/osd_client.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 69ef6539ca14..ca79cad50840 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -1268,26 +1268,6 @@ static void complete_request(struct ceph_osd_request *req)
1268 complete_all(&req->r_safe_completion); /* fsync waiter */ 1268 complete_all(&req->r_safe_completion); /* fsync waiter */
1269} 1269}
1270 1270
1271static int __decode_pgid(void **p, void *end, struct ceph_pg *pgid)
1272{
1273 __u8 v;
1274
1275 ceph_decode_need(p, end, 1 + 8 + 4 + 4, bad);
1276 v = ceph_decode_8(p);
1277 if (v > 1) {
1278 pr_warning("do not understand pg encoding %d > 1", v);
1279 return -EINVAL;
1280 }
1281 pgid->pool = ceph_decode_64(p);
1282 pgid->seed = ceph_decode_32(p);
1283 *p += 4;
1284 return 0;
1285
1286bad:
1287 pr_warning("incomplete pg encoding");
1288 return -EINVAL;
1289}
1290
1291/* 1271/*
1292 * handle osd op reply. either call the callback if it is specified, 1272 * handle osd op reply. either call the callback if it is specified,
1293 * or do the completion to wake up the waiting thread. 1273 * or do the completion to wake up the waiting thread.
@@ -1321,7 +1301,7 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg,
1321 ceph_decode_need(&p, end, object_len, bad); 1301 ceph_decode_need(&p, end, object_len, bad);
1322 p += object_len; 1302 p += object_len;
1323 1303
1324 err = __decode_pgid(&p, end, &pg); 1304 err = ceph_decode_pgid(&p, end, &pg);
1325 if (err) 1305 if (err)
1326 goto bad; 1306 goto bad;
1327 1307