linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
	 Minchan Kim <minchan@kernel.org>,
	Yuwen Chen <ywen.chen@foxmail.com>,
	 Richard Chang <richardycc@google.com>,
	Brian Geffon <bgeffon@google.com>,
	 Fengyu Lian <licayy@outlook.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	 linux-block@vger.kernel.org
Subject: Re: [PATCHv4 2/6] zram: add writeback batch size device attr
Date: Fri, 21 Nov 2025 10:55:10 +0900	[thread overview]
Message-ID: <birguuoazoxjeijvnnxjlpv2avd5cgptf4cylmdaj2a2sdhhem@svegzn74fjr7> (raw)
In-Reply-To: <20251120171738.84516c55e4aaeea0bf3b7725@linux-foundation.org>

On (25/11/20 17:17), Andrew Morton wrote:
> > +static ssize_t writeback_batch_size_store(struct device *dev,
> > +					  struct device_attribute *attr,
> > +					  const char *buf, size_t len)
> > +{
> > +	struct zram *zram = dev_to_zram(dev);
> > +	u32 val;
> > +	ssize_t ret = -EINVAL;
> > +
> > +	if (kstrtouint(buf, 10, &val))
> > +		return ret;
> > +
> > +	if (!val)
> > +		val = 1;
> > +
> > +	down_read(&zram->init_lock);
> 
> down_write()?

Indeed.  Thanks!


  reply	other threads:[~2025-11-21  1:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-18  7:29 [PATCHv4 0/6] zram: introduce writeback bio batching Sergey Senozhatsky
2025-11-18  7:29 ` [PATCHv4 1/6] zram: introduce writeback bio batching support Sergey Senozhatsky
2025-11-18  7:29 ` [PATCHv4 2/6] zram: add writeback batch size device attr Sergey Senozhatsky
2025-11-21  1:17   ` Andrew Morton
2025-11-21  1:55     ` Sergey Senozhatsky [this message]
2025-11-18  7:29 ` [PATCHv4 3/6] zram: take write lock in wb limit store handlers Sergey Senozhatsky
2025-11-18  7:29 ` [PATCHv4 4/6] zram: drop wb_limit_lock Sergey Senozhatsky
2025-11-18  7:29 ` [PATCHv4 5/6] zram: rework bdev block allocation Sergey Senozhatsky
2025-11-18  7:30 ` [PATCHv4 6/6] zram: read slot block idx under slot lock Sergey Senozhatsky

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=birguuoazoxjeijvnnxjlpv2avd5cgptf4cylmdaj2a2sdhhem@svegzn74fjr7 \
    --to=senozhatsky@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=bgeffon@google.com \
    --cc=licayy@outlook.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=richardycc@google.com \
    --cc=ywen.chen@foxmail.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