]> git.baikalelectronics.ru Git - kernel.git/commit
block: optimise boundary blkdev_read_iter's checks
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 20 Oct 2021 19:00:48 +0000 (20:00 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 21 Oct 2021 14:27:17 +0000 (08:27 -0600)
commitff35128f3fc7fe5caf9bef66595325d9a199073c
tree1bdb58baedf360a0e43ae05cdee388597de95545
parentf0a160d932b4ab4b9a658caa234236d93ce8b719
block: optimise boundary blkdev_read_iter's checks

Combine pos and len checks and mark unlikely. Also, don't reexpand if
it's not truncated.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/fff34e613aeaae1ad12977dc4592cb1a1f5d3190.1634755800.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/fops.c