Merge tag 'iio-fixes-for-4.6a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
[deliverable/linux.git] / drivers / block / rbd.c
index 4a876785b68cd5c550dbbb1d2b63071446454081..9c6234428607fb60a6d65a3ea0c1eebfa72b6b96 100644 (file)
@@ -1847,14 +1847,12 @@ static void rbd_osd_req_callback(struct ceph_osd_request *osd_req,
        if (osd_req->r_result < 0)
                obj_request->result = osd_req->r_result;
 
-       rbd_assert(osd_req->r_num_ops <= CEPH_OSD_MAX_OP);
-
        /*
         * We support a 64-bit length, but ultimately it has to be
         * passed to the block layer, which just supports a 32-bit
         * length field.
         */
-       obj_request->xferred = osd_req->r_reply_op_len[0];
+       obj_request->xferred = osd_req->r_ops[0].outdata_len;
        rbd_assert(obj_request->xferred < (u64)UINT_MAX);
 
        opcode = osd_req->r_ops[0].op;
@@ -5643,18 +5641,12 @@ static void rbd_sysfs_cleanup(void)
 static int rbd_slab_init(void)
 {
        rbd_assert(!rbd_img_request_cache);
-       rbd_img_request_cache = kmem_cache_create("rbd_img_request",
-                                       sizeof (struct rbd_img_request),
-                                       __alignof__(struct rbd_img_request),
-                                       0, NULL);
+       rbd_img_request_cache = KMEM_CACHE(rbd_img_request, 0);
        if (!rbd_img_request_cache)
                return -ENOMEM;
 
        rbd_assert(!rbd_obj_request_cache);
-       rbd_obj_request_cache = kmem_cache_create("rbd_obj_request",
-                                       sizeof (struct rbd_obj_request),
-                                       __alignof__(struct rbd_obj_request),
-                                       0, NULL);
+       rbd_obj_request_cache = KMEM_CACHE(rbd_obj_request, 0);
        if (!rbd_obj_request_cache)
                goto out_err;
 
This page took 0.025084 seconds and 5 git commands to generate.