diff options
author | Jens Axboe <axboe@fb.com> | 2017-02-02 08:54:40 -0700 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-02-03 09:47:32 -0700 |
commit | b973cb7e89fe3dcc2bc72c5b3aa7a3bfd9d0e6d5 (patch) | |
tree | 8949e898cd4e87d63b6752ae8dfa36e1b461da77 /block/blk.h | |
parent | 9b54d816e00425c3a517514e0d677bb3cec49258 (diff) | |
download | linux-b973cb7e89fe3dcc2bc72c5b3aa7a3bfd9d0e6d5.tar.bz2 |
blk-merge: return the merged request
When we attempt to merge request-to-request, we return a 0/1 if we
ended up merging or not. Change that to return the pointer to the
request that we freed. We will use this to move the freeing of
that request out of the merge logic, so that callers can drop
locks before freeing the request.
There should be no functional changes in this patch.
Signed-off-by: Jens Axboe <axboe@fb.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Diffstat (limited to 'block/blk.h')
-rw-r--r-- | block/blk.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk.h b/block/blk.h index 6aa53a4aad88..4972b98d47e1 100644 --- a/block/blk.h +++ b/block/blk.h @@ -208,8 +208,8 @@ int ll_back_merge_fn(struct request_queue *q, struct request *req, struct bio *bio); int ll_front_merge_fn(struct request_queue *q, struct request *req, struct bio *bio); -int attempt_back_merge(struct request_queue *q, struct request *rq); -int attempt_front_merge(struct request_queue *q, struct request *rq); +struct request *attempt_back_merge(struct request_queue *q, struct request *rq); +struct request *attempt_front_merge(struct request_queue *q, struct request *rq); int blk_attempt_req_merge(struct request_queue *q, struct request *rq, struct request *next); void blk_recalc_rq_segments(struct request *rq); |