summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_parser.py
diff options
context:
space:
mode:
authorSergey Senozhatsky <senozhatsky@chromium.org>2025-06-27 16:18:21 +0900
committerJens Axboe <axboe@kernel.dk>2025-07-03 19:56:51 -0600
commite74a1c6a8e8af2422fce125c29b14f1d3fab5b5c (patch)
treed182141eb19fabde01fbbba694379d841269eb8c /scripts/lib/kdoc/kdoc_parser.py
parent264a3fdab2365395e43d3a0b40162a29e61ffa22 (diff)
zram: pass buffer offset to zcomp_available_show()
In most cases zcomp_available_show() is the only emitting function that is called from sysfs read() handler, so it assumes that there is a whole PAGE_SIZE buffer to work with. There is an exception, however: recomp_algorithm_show(). In recomp_algorithm_show() we prepend the buffer with priority number before we pass it to zcomp_available_show(), so it cannot assume PAGE_SIZE anymore and must take recomp_algorithm_show() modifications into consideration. Therefore we need to pass buffer offset to zcomp_available_show(). Also convert it to use sysfs_emit_at(), to stay aligned with the rest of zram's sysfs read() handlers. On practice we are never even close to using the whole PAGE_SIZE buffer, so that's not a critical bug, but still. Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> Link: https://lore.kernel.org/r/20250627071840.1394242-1-senozhatsky@chromium.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions