OSDN Git Service

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)
commit6450fe1f668f410fe2ab69c79a52a0929a4a8296
tree1bdb58baedf360a0e43ae05cdee388597de95545
parent057178cf518e699695a4b614a7a08c350b1fdcfd
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