]> Gentwo Git Trees - linux/.git/commit
zram: factor out ZRAM_SAME write
authorSergey Senozhatsky <senozhatsky@chromium.org>
Wed, 18 Dec 2024 06:34:20 +0000 (15:34 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 14 Jan 2025 06:41:04 +0000 (22:41 -0800)
commit208b2c6833f733708c3651a2abcead54d9e8b7cc
treea6bf01a9ab05ac0d1e3ec8e3b3eb040de10cb0fc
parent65d114fa5d8da1298c41d597a3f194c70b53149d
zram: factor out ZRAM_SAME write

Handling of ZRAM_SAME now uses a goto to the final stages of
zram_write_page() plus it introduces a branch and flags variable, which is
not making the code any simpler.  In reality, we can handle ZRAM_SAME
immediately when we detect such pages and remove a goto and a branch.

Factor out ZRAM_SAME handling into a separate routine to simplify
zram_write_page().

Link: https://lkml.kernel.org/r/20241218063513.297475-4-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