From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E3E8A2D47F4 for ; Thu, 15 Jan 2026 22:07:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768514865; cv=none; b=MxhpBrMnleUfxnryuygMuVUYAx58EYXRIAQfAYiOFUlW7izs2+3qbpK2mmQV1LW8xV/r9ZuFLJyB7erscMhsf5jPIRpvxU+Er8PMoqciuxnZy57GHGO5bV0KVEJMxr6lD0oFa6RPwHXf2s0ExSSEPRUkmLlJ6hnqeBGlfpg45Fg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768514865; c=relaxed/simple; bh=W3Cr+RejR+eSzFWDIZeH7kRpZoscMgmTdLsXquo7HdU=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=TNn+qZVGVK5uexBlxyCbCR1n22tvSue/wIq7WIKz5JrJ6xKBl6tTQhEs9IgydTQUEKkuu6dDqgfFG9ky1bL338YC+LG+oYycGpJPisUECZf6BPzhYXgAEvkYgKyJHAgnd9zvK7JXZXJQa6aCmTo8U4EOwE+U6XenS4MwXjDKcYI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=c09TgZ58; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="c09TgZ58" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46889C116D0; Thu, 15 Jan 2026 22:07:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1768514864; bh=W3Cr+RejR+eSzFWDIZeH7kRpZoscMgmTdLsXquo7HdU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=c09TgZ58wztqMmQaJ3qAKXi2wc+IryyFkL4oL81hS6kx168XYxN4THaoameBiTtnW OLcRPlXnqzBQz41pRk/sSplUaHVdYQ/bpky+B5rXvFugZuF9EWfYPCiZIT7ZvapCPl 7JmaGvH53+iIMwIPvsaF7WbJJPhAoLrCNMgN2+qM= Date: Thu, 15 Jan 2026 14:07:43 -0800 From: Andrew Morton To: Sergey Senozhatsky Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Chris Mason Subject: Re: [PATCH 2/2] zram: fixup read_block_state() Message-Id: <20260115140743.f7ada77bc912595a580eaf7c@linux-foundation.org> In-Reply-To: <20260115033031.3818977-1-senozhatsky@chromium.org> References: <20251216022727.578BFC4CEF5@smtp.kernel.org> <20260115033031.3818977-1-senozhatsky@chromium.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 15 Jan 2026 12:30:06 +0900 Sergey Senozhatsky 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 The Closes: link would be helpful. > Signed-off-by: Sergey Senozhatsky > --- > 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' : '.',