zram: simplify bvec iteration in __zram_make_request
authorChristoph Hellwig <hch@lst.de>
Tue, 11 Apr 2023 17:14:46 +0000 (19:14 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 18 Apr 2023 23:29:57 +0000 (16:29 -0700)
commitaf8b04c63708fa730c0257084fab91fb2a9cecc4
treed36912ad176e9d93b2d7ab783157de2effeab77b
parent0120dd6e4e202e19a0e011e486fb2da40a5ea279
zram: simplify bvec iteration in __zram_make_request

bio_for_each_segment synthetize bvecs that never cross page boundaries, so
don't duplicate that work in an inner loop.

Link: https://lkml.kernel.org/r/20230411171459.567614-5-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/zram/zram_drv.c