]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix max segment size handling in blk_queue_virt_boundary
authorChristoph Hellwig <hch@lst.de>
Wed, 24 Jul 2019 16:26:56 +0000 (18:26 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 26 Jul 2019 18:50:57 +0000 (12:50 -0600)
commite7ea0abd1c11332e5f864c9798022d0e99a32222
treeb17280da070959c9478ace36f0f184861ff969e1
parent44fe9b6ebf550e62b442d8bb4e0a384c4b28c41f
block: fix max segment size handling in blk_queue_virt_boundary

We should only set the max segment size to unlimited if we actually
have a virt boundary.  Otherwise we accidentally clear that limit
when called from the SCSI midlayer, which always calls
blk_queue_virt_boundary, even if that mask is 0.

Fixes: 1a5637861dd1 ("scsi: core: add a host / host template field for the virt boundary")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-settings.c