diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2018-01-30 11:52:11 -0500 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-04-02 04:12:41 -0400 |
commit | efbd1a1106f15f9260c7cb9a67f5c380a39b4fcc (patch) | |
tree | bd9f8cd708dfff3f66bad2f04aca1d7727464a61 /drivers/block/rbd.c | |
parent | 9bb0248d9eb9438b991ba538e30eedb493cf1fb4 (diff) |
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 <idryomov@gmail.com>
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r-- | drivers/block/rbd.c | 13 |
1 files changed, 3 insertions, 10 deletions
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: | |||
2223 | return -ENOMEM; | 2223 | return -ENOMEM; |
2224 | } | 2224 | } |
2225 | 2225 | ||
2226 | static int rbd_img_request_submit(struct rbd_img_request *img_request) | 2226 | static void rbd_img_request_submit(struct rbd_img_request *img_request) |
2227 | { | 2227 | { |
2228 | struct rbd_obj_request *obj_request; | 2228 | struct rbd_obj_request *obj_request; |
2229 | struct rbd_obj_request *next_obj_request; | ||
2230 | int ret = 0; | ||
2231 | 2229 | ||
2232 | dout("%s: img %p\n", __func__, img_request); | 2230 | dout("%s: img %p\n", __func__, img_request); |
2233 | 2231 | ||
2234 | rbd_img_request_get(img_request); | 2232 | rbd_img_request_get(img_request); |
2235 | for_each_obj_request_safe(img_request, obj_request, next_obj_request) { | 2233 | for_each_obj_request(img_request, obj_request) |
2236 | rbd_obj_request_submit(obj_request); | 2234 | rbd_obj_request_submit(obj_request); |
2237 | } | ||
2238 | 2235 | ||
2239 | rbd_img_request_put(img_request); | 2236 | rbd_img_request_put(img_request); |
2240 | return ret; | ||
2241 | } | 2237 | } |
2242 | 2238 | ||
2243 | static void rbd_img_end_child_request(struct rbd_img_request *img_req); | 2239 | 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) | |||
3668 | if (result) | 3664 | if (result) |
3669 | goto err_img_request; | 3665 | goto err_img_request; |
3670 | 3666 | ||
3671 | result = rbd_img_request_submit(img_request); | 3667 | rbd_img_request_submit(img_request); |
3672 | if (result) | ||
3673 | goto err_img_request; | ||
3674 | |||
3675 | if (must_be_locked) | 3668 | if (must_be_locked) |
3676 | up_read(&rbd_dev->lock_rwsem); | 3669 | up_read(&rbd_dev->lock_rwsem); |
3677 | return; | 3670 | return; |