summaryrefslogtreecommitdiffstats
path: root/drivers/block/rbd.c
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2019-01-22 05:56:30 -0500
committerIlya Dryomov <idryomov@gmail.com>2019-03-05 12:55:17 -0500
commitfd7e3f0d8f25e4e3fed9fa3a743af92ebcbaf4e9 (patch)
tree34ec9589be8eff54a956e00e2a98b8a346647d5d /drivers/block/rbd.c
parent6b41d4d9cb8f48363e50990e00c64c3fde355d11 (diff)
rbd: get rid of obj_req->obj_request_count
It is effectively unused. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r--drivers/block/rbd.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 1e92b61d0bd5..d071608507f2 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -291,7 +291,6 @@ struct rbd_img_request {
291 int result; /* first nonzero obj_request result */ 291 int result; /* first nonzero obj_request result */
292 292
293 struct list_head object_extents; /* obj_req.ex structs */ 293 struct list_head object_extents; /* obj_req.ex structs */
294 u32 obj_request_count;
295 u32 pending_count; 294 u32 pending_count;
296 295
297 struct kref kref; 296 struct kref kref;
@@ -1345,7 +1344,6 @@ static inline void rbd_img_obj_request_add(struct rbd_img_request *img_request,
1345 1344
1346 /* Image request now owns object's original reference */ 1345 /* Image request now owns object's original reference */
1347 obj_request->img_request = img_request; 1346 obj_request->img_request = img_request;
1348 img_request->obj_request_count++;
1349 img_request->pending_count++; 1347 img_request->pending_count++;
1350 dout("%s: img %p obj %p\n", __func__, img_request, obj_request); 1348 dout("%s: img %p obj %p\n", __func__, img_request, obj_request);
1351} 1349}
@@ -1355,8 +1353,6 @@ static inline void rbd_img_obj_request_del(struct rbd_img_request *img_request,
1355{ 1353{
1356 dout("%s: img %p obj %p\n", __func__, img_request, obj_request); 1354 dout("%s: img %p obj %p\n", __func__, img_request, obj_request);
1357 list_del(&obj_request->ex.oe_item); 1355 list_del(&obj_request->ex.oe_item);
1358 rbd_assert(img_request->obj_request_count > 0);
1359 img_request->obj_request_count--;
1360 rbd_assert(obj_request->img_request == img_request); 1356 rbd_assert(obj_request->img_request == img_request);
1361 rbd_obj_request_put(obj_request); 1357 rbd_obj_request_put(obj_request);
1362} 1358}
@@ -1672,7 +1668,6 @@ static void rbd_img_request_destroy(struct kref *kref)
1672 1668
1673 for_each_obj_request_safe(img_request, obj_request, next_obj_request) 1669 for_each_obj_request_safe(img_request, obj_request, next_obj_request)
1674 rbd_img_obj_request_del(img_request, obj_request); 1670 rbd_img_obj_request_del(img_request, obj_request);
1675 rbd_assert(img_request->obj_request_count == 0);
1676 1671
1677 if (img_request_layered_test(img_request)) { 1672 if (img_request_layered_test(img_request)) {
1678 img_request_layered_clear(img_request); 1673 img_request_layered_clear(img_request);