]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
zram: rename internal slot API
authorSergey Senozhatsky <senozhatsky@chromium.org>
Mon, 15 Dec 2025 05:47:12 +0000 (14:47 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 21 Jan 2026 03:24:38 +0000 (19:24 -0800)
commitbde60fe747216d3449a1a74f07937a5273717b69
treeee2d5df60ecf969e6ef16e96d01bf497e1c89db1
parent2e8ff2f51dde73a26b94aed2df4827177bd25e6e
zram: rename internal slot API

We have a somewhat confusing internal API naming.  E.g.  the following
code:

zram_slot_lock()
if (zram_allocated())
zram_set_flag()
zram_slot_unlock()

may look like it does something on zram device level, but in fact it tests
and sets slot entry flags, not the device ones.

Rename API to explicitly distinguish functions that operate on the slot
level from functions that operate on the zram device level.

While at it, fixup some coding styles.

[senozhatsky@chromium.org: fix up mark_slot_accessed()]
Link: https://lkml.kernel.org/r/20260115031922.3813659-1-senozhatsky@chromium.org
Link: https://lkml.kernel.org/r/775a0b1a0ace5caf1f05965d8bc637c1192820fa.1765775954.git.senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Brian Geffon <bgeffon@google.com>
Cc: David Stevens <stevensd@google.com>
Cc: Minchan Kim <minchan@google.com>
Cc: Richard Chang <richardycc@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/zram/zram_drv.c