]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix offset/size check in bio_trim()
authorMing Lei <ming.lei@redhat.com>
Thu, 14 Apr 2022 08:44:43 +0000 (16:44 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 14 Apr 2022 16:15:24 +0000 (10:15 -0600)
commit5055ea51303007642d49ed49dcf57f09c3102450
treee9c075b67cfb7fc756b503c90219c171b23cb41b
parent930a8958c1988e17695be24a6e6dcc02f8a7a95b
block: fix offset/size check in bio_trim()

Unit of bio->bi_iter.bi_size is bytes, but unit of offset/size
is sector.

Fix the above issue in checking offset/size in bio_trim().

Fixes: 524667a5dee3 ("block: fix argument type of bio_trim()")
Cc: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20220414084443.1736850-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c