]> git.baikalelectronics.ru Git - kernel.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)
commitf62919b3877d03143ab4ffa1e32a5ff8614be707
treedb48d8e6ce3cf63e89a9f5b0c7975709290aa75a
parentd3475a1f9cd5ca4ae18f7ebab3cbb879e59b3331
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