]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix incorrect branching in blk_max_size_offset()
authorMike Snitzer <snitzer@redhat.com>
Fri, 4 Dec 2020 22:21:03 +0000 (17:21 -0500)
committerMike Snitzer <snitzer@redhat.com>
Fri, 4 Dec 2020 22:27:42 +0000 (17:27 -0500)
commit113f0c713e3163adcb68cb4dd888e0b19a7d67b6
tree0ea0faecf593a44ee9f9bac012dfab2a52d85b2e
parent7acdffabf2b6070a527ff64e8b0e5dcab8851f3b
block: fix incorrect branching in blk_max_size_offset()

If non-zero 'chunk_sectors' is passed in to blk_max_size_offset() that
override will be incorrectly ignored.

Old blk_max_size_offset() branching, prior to commit 23cb14b3e984,
must be used only if passed 'chunk_sectors' override is zero.

Fixes: 23cb14b3e984 ("dm: fix IO splitting")
Cc: stable@vger.kernel.org # 5.9
Reported-by: John Dorminy <jdorminy@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
include/linux/blkdev.h