]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix get_max_io_size()
authorKeith Busch <kbusch@kernel.org>
Thu, 6 Aug 2020 21:58:37 +0000 (14:58 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 21 Aug 2020 23:09:22 +0000 (17:09 -0600)
commit5ffedf4c6e6ae1c887e0d0bef6d046878252ff00
tree24f135d23704e2ec34c87f0ee6bf976edc2acd2f
parentd46cd6c50eb4736f67efe39b94a5a94371a32156
block: fix get_max_io_size()

A previous commit aligning splits to physical block sizes inadvertently
modified one return case such that that it now returns 0 length splits
when the number of sectors doesn't exceed the physical offset. This
later hits a BUG in bio_split(). Restore the previous working behavior.

Fixes: e0f65b8216276 ("block: Improve physical block alignment of split bios")
Reported-by: Eric Deal <eric.deal@wdc.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-merge.c