]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
zram: refactor highlevel read and write handling
authorChristoph Hellwig <hch@lst.de>
Tue, 11 Apr 2023 17:14:49 +0000 (19:14 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 18 Apr 2023 23:29:58 +0000 (16:29 -0700)
commit82ca875d2549f6843d0d16e897c9e1e0a13c8a74
treef99ec345290ccabbd02ad957623fbafe15385b51
parent57de7bd830dae90301329748d60e196fab4c4125
zram: refactor highlevel read and write handling

Instead of having an outer loop in __zram_make_request and then branch out
for reads vs writes for each loop iteration in zram_bvec_rw, split the
main handler into separat zram_bio_read and zram_bio_write handlers that
also include the functionality formerly in zram_bvec_rw.

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