From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
Minchan Kim <minchan@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] zram: remove zcomp_stream_put() from write_incompressible_page()
Date: Thu, 16 Jan 2025 09:37:50 +0900 [thread overview]
Message-ID: <437m2czavj4zy2dq5f7bvlivqfhdkpet4woor3orr3npl7bdlz@kwn3usnqbzjy> (raw)
In-Reply-To: <20250115152837.b9f721bccfd07ce903fc4539@linux-foundation.org>
On (25/01/15 15:28), Andrew Morton wrote:
> > We cannot and should not put per-CPU compression stream in
> > write_incompressible_page() because that function never gets any
> > per-CPU streams in the first place. It's zram_write_page() that
> > puts the stream before it calls write_incompressible_page().
> >
> > ...
> >
> > +++ b/drivers/block/zram/zram_drv.c
> > @@ -1683,7 +1683,6 @@ static int write_incompressible_page(struct zram *zram, struct page *page,
> > return PTR_ERR((void *)handle);
> >
> > if (!zram_can_store_page(zram)) {
> > - zcomp_stream_put(zram->comps[ZRAM_PRIMARY_COMP]);
> > zs_free(zram->mem_pool, handle);
> > return -ENOMEM;
> > }
>
> I added
>
> Fixes: 485d11509d6d ("zram: factor out ZRAM_HUGE write")
Thanks.
> That way, anyone who backports 485d11509d6d into their earlier kernel
> will have a better chance of noticing that they need this fixup.
Agreed.
prev parent reply other threads:[~2025-01-16 0:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 7:19 Sergey Senozhatsky
2025-01-15 23:28 ` Andrew Morton
2025-01-16 0:37 ` Sergey Senozhatsky [this message]
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=437m2czavj4zy2dq5f7bvlivqfhdkpet4woor3orr3npl7bdlz@kwn3usnqbzjy \
--to=senozhatsky@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.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