public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	 Minchan Kim <minchan@kernel.org>,
	Brian Geffon <bgeffon@google.com>,
	 Richard Chang <richardycc@google.com>,
	linux-block@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] zram: do not slot_free() written-back slots
Date: Thu, 19 Mar 2026 13:05:55 +0900	[thread overview]
Message-ID: <abt1dsjsT9826Ewy@google.com> (raw)
In-Reply-To: <20260319034912.1894770-1-senozhatsky@chromium.org>

As a side note:

On (26/03/19 12:44), Sergey Senozhatsky wrote:
> -	slot_free(zram, index);
[..]
> -		if (huge)
> -			set_slot_flag(zram, index, ZRAM_HUGE);

Original code had a bug.  slot_free() would decrement ->huge_pages,
then writeback completion would restore the HUGE flag, so when slot
would get freed for real slot_free() would decrement ->huge_pages
again, leading to underflow.


  reply	other threads:[~2026-03-19  4:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19  3:44 [PATCH] zram: do not slot_free() written-back slots Sergey Senozhatsky
2026-03-19  4:05 ` Sergey Senozhatsky [this message]
2026-03-19  6:47   ` Richard Chang
2026-03-19  7:21     ` Sergey Senozhatsky
2026-03-19 17:59   ` Minchan Kim
2026-03-19 19:43 ` Minchan Kim

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=abt1dsjsT9826Ewy@google.com \
    --to=senozhatsky@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=bgeffon@google.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=richardycc@google.com \
    /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