* [PATCH 2/2] zram: fixup read_block_state()
[not found] <20251216022727.578BFC4CEF5@smtp.kernel.org>
@ 2026-01-15 3:30 ` Sergey Senozhatsky
0 siblings, 0 replies; only message in thread
From: Sergey Senozhatsky @ 2026-01-15 3:30 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, linux-mm, Sergey Senozhatsky, Chris Mason
ac_time is now in seconds, do not use ktime_to_timespec64()
Reported-by: Chris Mason <clm@meta.com>
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
---
drivers/block/zram/zram_drv.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index cc51aa8b6181..912711faa4e4 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -1579,11 +1579,9 @@ static ssize_t read_block_state(struct file *file, char __user *buf,
if (!slot_allocated(zram, index))
goto next;
- ts = ktime_to_timespec64(zram->table[index].attr.ac_time);
copied = snprintf(kbuf + written, count,
- "%12zd %12lld.%06lu %c%c%c%c%c%c\n",
- index, (s64)ts.tv_sec,
- ts.tv_nsec / NSEC_PER_USEC,
+ "%12zd %12u.%06lu %c%c%c%c%c%c\n",
+ index, zram->table[index].attr.ac_time, 0,
test_slot_flag(zram, index, ZRAM_SAME) ? 's' : '.',
test_slot_flag(zram, index, ZRAM_WB) ? 'w' : '.',
test_slot_flag(zram, index, ZRAM_HUGE) ? 'h' : '.',
--
2.52.0.457.g6b5491de43-goog
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-01-15 3:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20251216022727.578BFC4CEF5@smtp.kernel.org>
2026-01-15 3:30 ` [PATCH 2/2] zram: fixup read_block_state() Sergey Senozhatsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox