Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

zram: fixup read_block_state()

ac_time is now in seconds, do not use ktime_to_timespec64()

[akpm@linux-foundation.org: remove now-unused local `ts']
[akpm@linux-foundation.org: fix build]
Link: https://lkml.kernel.org/r/20260115033031.3818977-1-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reported-by: Chris Mason <clm@meta.com>
Closes: https://lkml.kernel.org/r/20260114124522.1326519-1-clm@meta.com
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>

authored by

Sergey Senozhatsky and committed by
Andrew Morton
8b05d2d8 4932844e

+2 -5
+2 -5
drivers/block/zram/zram_drv.c
··· 1570 1570 ssize_t index, written = 0; 1571 1571 struct zram *zram = file->private_data; 1572 1572 unsigned long nr_pages = zram->disksize >> PAGE_SHIFT; 1573 - struct timespec64 ts; 1574 1573 1575 1574 kbuf = kvmalloc(count, GFP_KERNEL); 1576 1575 if (!kbuf) ··· 1588 1589 if (!slot_allocated(zram, index)) 1589 1590 goto next; 1590 1591 1591 - ts = ktime_to_timespec64(zram->table[index].attr.ac_time); 1592 1592 copied = snprintf(kbuf + written, count, 1593 - "%12zd %12lld.%06lu %c%c%c%c%c%c\n", 1594 - index, (s64)ts.tv_sec, 1595 - ts.tv_nsec / NSEC_PER_USEC, 1593 + "%12zd %12u.%06d %c%c%c%c%c%c\n", 1594 + index, zram->table[index].attr.ac_time, 0, 1596 1595 test_slot_flag(zram, index, ZRAM_SAME) ? 's' : '.', 1597 1596 test_slot_flag(zram, index, ZRAM_WB) ? 'w' : '.', 1598 1597 test_slot_flag(zram, index, ZRAM_HUGE) ? 'h' : '.',