(unsigned long long) len, coll, coll_index);
osdc = &rbd_dev->rbd_client->client->osdc;
- osd_req = ceph_osdc_alloc_request(osdc, snapc, ops,
- false, GFP_NOIO, pages, bio);
+ osd_req = ceph_osdc_alloc_request(osdc, snapc, ops, false, GFP_NOIO);
if (!osd_req) {
ret = -ENOMEM;
goto done_pages;
}
osd_req->r_flags = flags;
+ osd_req->r_pages = pages;
+ if (bio) {
+ osd_req->r_bio = bio;
+ bio_get(osd_req->r_bio);
+ }
osd_req->r_callback = rbd_cb;
rbd_req->rq = rq;
struct ceph_snap_context *snapc,
struct ceph_osd_req_op *ops,
bool use_mempool,
- gfp_t gfp_flags,
- struct page **pages,
- struct bio *bio);
+ gfp_t gfp_flags);
extern void ceph_osdc_build_request(struct ceph_osd_request *req,
u64 off, u64 len,
struct ceph_snap_context *snapc,
struct ceph_osd_req_op *ops,
bool use_mempool,
- gfp_t gfp_flags,
- struct page **pages,
- struct bio *bio)
+ gfp_t gfp_flags)
{
struct ceph_osd_request *req;
struct ceph_msg *msg;
memset(msg->front.iov_base, 0, msg->front.iov_len);
req->r_request = msg;
- req->r_pages = pages;
-#ifdef CONFIG_BLOCK
- if (bio) {
- req->r_bio = bio;
- bio_get(req->r_bio);
- }
-#endif
return req;
}
} else
ops[1].op = 0;
- req = ceph_osdc_alloc_request(osdc, snapc, ops,
- use_mempool,
- GFP_NOFS, NULL, NULL);
+ req = ceph_osdc_alloc_request(osdc, snapc, ops, use_mempool, GFP_NOFS);
if (!req)
return ERR_PTR(-ENOMEM);
req->r_flags = flags;