From efbd1a1106f15f9260c7cb9a67f5c380a39b4fcc Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Tue, 30 Jan 2018 17:52:11 +0100 Subject: rbd: update rbd_img_request_submit() signature It should be void now. Also, object requests are unlinked only in image request destructor, which can't run before rbd_img_request_put(), so no need for _safe. Signed-off-by: Ilya Dryomov --- drivers/block/rbd.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'drivers/block') diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index e542fda18395..015bd5303f0e 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -2223,21 +2223,17 @@ out_unwind: return -ENOMEM; } -static int rbd_img_request_submit(struct rbd_img_request *img_request) +static void rbd_img_request_submit(struct rbd_img_request *img_request) { struct rbd_obj_request *obj_request; - struct rbd_obj_request *next_obj_request; - int ret = 0; dout("%s: img %p\n", __func__, img_request); rbd_img_request_get(img_request); - for_each_obj_request_safe(img_request, obj_request, next_obj_request) { + for_each_obj_request(img_request, obj_request) rbd_obj_request_submit(obj_request); - } rbd_img_request_put(img_request); - return ret; } static void rbd_img_end_child_request(struct rbd_img_request *img_req); @@ -3668,10 +3664,7 @@ static void rbd_queue_workfn(struct work_struct *work) if (result) goto err_img_request; - result = rbd_img_request_submit(img_request); - if (result) - goto err_img_request; - + rbd_img_request_submit(img_request); if (must_be_locked) up_read(&rbd_dev->lock_rwsem); return; -- cgit v1.2.1