]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
block: return from __bio_try_merge_page if merging occured in the same page
authorChristoph Hellwig <hch@lst.de>
Mon, 17 Jun 2019 09:14:11 +0000 (11:14 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 17 Jun 2019 15:33:02 +0000 (09:33 -0600)
commitff896738be381efa6e50ba9a3b6cdc94f69ada42
treedb48d8e6ce3cf63e89a9f5b0c7975709290aa75a
parent1d0c06513bd44e724f572ef9c932d0c889d183c6
block: return from __bio_try_merge_page if merging occured in the same page

We currently have an input same_page parameter to __bio_try_merge_page
to prohibit merging in the same page.  The rationale for that is that
some callers need to account for every page added to a bio.  Instead of
letting these callers call twice into the merge code to account for the
new vs existing page cases, just turn the paramter into an output one that
returns if a merge in the same page occured and let them act accordingly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c
fs/iomap.c
fs/xfs/xfs_aops.c
include/linux/bio.h