linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Chris Mason <clm@meta.com>
Subject: Re: [PATCH 2/2] zram: fixup read_block_state()
Date: Thu, 15 Jan 2026 14:07:43 -0800	[thread overview]
Message-ID: <20260115140743.f7ada77bc912595a580eaf7c@linux-foundation.org> (raw)
In-Reply-To: <20260115033031.3818977-1-senozhatsky@chromium.org>

On Thu, 15 Jan 2026 12:30:06 +0900 Sergey Senozhatsky <senozhatsky@chromium.org> wrote:

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

Please help me out here - which patch introduced the issue which Chris
found?

> Reported-by: Chris Mason <clm@meta.com>

The Closes: link would be helpful.

> 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,

local `ts' is now unused?

>  			test_slot_flag(zram, index, ZRAM_SAME) ? 's' : '.',
>  			test_slot_flag(zram, index, ZRAM_WB) ? 'w' : '.',
>  			test_slot_flag(zram, index, ZRAM_HUGE) ? 'h' : '.',



  reply	other threads:[~2026-01-15 22:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20251216022727.578BFC4CEF5@smtp.kernel.org>
2026-01-15  3:30 ` Sergey Senozhatsky
2026-01-15 22:07   ` Andrew Morton [this message]
2026-01-15 22:54     ` Sergey Senozhatsky
2026-01-15 23:25       ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260115140743.f7ada77bc912595a580eaf7c@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=clm@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=senozhatsky@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox