]> www.infradead.org Git - users/jedix/linux-maple.git/commit
zram: use zram_read_from_zspool() in writeback
authorSergey Senozhatsky <senozhatsky@chromium.org>
Wed, 18 Dec 2024 06:34:23 +0000 (15:34 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 26 Jan 2025 04:22:20 +0000 (20:22 -0800)
commitb8d3ff7bb5111c6a88d5672469de445d9b46cf22
tree3d065e87f4ed872525edac97b15e3fefb5d74fe3
parente355b253adbcc45e32acd28926f5c61b34f30c93
zram: use zram_read_from_zspool() in writeback

We only can read pages from zspool in writeback, zram_read_page() is not
really right in that context not only because it's a more generic function
that handles ZRAM_WB pages, but also because it requires us to unlock slot
between slot flag check and actual page read.  Use zram_read_from_zspool()
instead and do slot flags check and page read under the same slot lock.

Link: https://lkml.kernel.org/r/20241218063513.297475-7-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/zram/zram_drv.c