diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/block/rbd.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 4a876785b68c..9c6234428607 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
| @@ -1847,14 +1847,12 @@ static void rbd_osd_req_callback(struct ceph_osd_request *osd_req, | |||
| 1847 | if (osd_req->r_result < 0) | 1847 | if (osd_req->r_result < 0) |
| 1848 | obj_request->result = osd_req->r_result; | 1848 | obj_request->result = osd_req->r_result; |
| 1849 | 1849 | ||
| 1850 | rbd_assert(osd_req->r_num_ops <= CEPH_OSD_MAX_OP); | ||
| 1851 | |||
| 1852 | /* | 1850 | /* |
| 1853 | * We support a 64-bit length, but ultimately it has to be | 1851 | * We support a 64-bit length, but ultimately it has to be |
| 1854 | * passed to the block layer, which just supports a 32-bit | 1852 | * passed to the block layer, which just supports a 32-bit |
| 1855 | * length field. | 1853 | * length field. |
| 1856 | */ | 1854 | */ |
| 1857 | obj_request->xferred = osd_req->r_reply_op_len[0]; | 1855 | obj_request->xferred = osd_req->r_ops[0].outdata_len; |
| 1858 | rbd_assert(obj_request->xferred < (u64)UINT_MAX); | 1856 | rbd_assert(obj_request->xferred < (u64)UINT_MAX); |
| 1859 | 1857 | ||
| 1860 | opcode = osd_req->r_ops[0].op; | 1858 | opcode = osd_req->r_ops[0].op; |
| @@ -5643,18 +5641,12 @@ static void rbd_sysfs_cleanup(void) | |||
| 5643 | static int rbd_slab_init(void) | 5641 | static int rbd_slab_init(void) |
| 5644 | { | 5642 | { |
| 5645 | rbd_assert(!rbd_img_request_cache); | 5643 | rbd_assert(!rbd_img_request_cache); |
| 5646 | rbd_img_request_cache = kmem_cache_create("rbd_img_request", | 5644 | rbd_img_request_cache = KMEM_CACHE(rbd_img_request, 0); |
| 5647 | sizeof (struct rbd_img_request), | ||
| 5648 | __alignof__(struct rbd_img_request), | ||
| 5649 | 0, NULL); | ||
| 5650 | if (!rbd_img_request_cache) | 5645 | if (!rbd_img_request_cache) |
| 5651 | return -ENOMEM; | 5646 | return -ENOMEM; |
| 5652 | 5647 | ||
| 5653 | rbd_assert(!rbd_obj_request_cache); | 5648 | rbd_assert(!rbd_obj_request_cache); |
| 5654 | rbd_obj_request_cache = kmem_cache_create("rbd_obj_request", | 5649 | rbd_obj_request_cache = KMEM_CACHE(rbd_obj_request, 0); |
| 5655 | sizeof (struct rbd_obj_request), | ||
| 5656 | __alignof__(struct rbd_obj_request), | ||
| 5657 | 0, NULL); | ||
| 5658 | if (!rbd_obj_request_cache) | 5650 | if (!rbd_obj_request_cache) |
| 5659 | goto out_err; | 5651 | goto out_err; |
| 5660 | 5652 | ||
