From: Christoph Hellwig <hch@lst.de>
To: Yongpeng Yang <yangyongpeng.storage@gmail.com>
Cc: Damien Le Moal <dlemoal@kernel.org>,
Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
Ming Lei <ming.lei@redhat.com>,
linux-block@vger.kernel.org,
Yongpeng Yang <yangyongpeng@xiaomi.com>,
Yongpeng Yang <yangyongpeng.storage@outlook.com>
Subject: Re: [PATCH v3 1/2] loop: use READ_ONCE() to read lo->lo_state without locking
Date: Mon, 15 Dec 2025 15:38:15 +0100 [thread overview]
Message-ID: <20251215143815.GA30633@lst.de> (raw)
In-Reply-To: <20251215094522.1493061-2-yangyongpeng.storage@gmail.com>
On Mon, Dec 15, 2025 at 05:45:22PM +0800, Yongpeng Yang wrote:
> idr_for_each_entry(&loop_index_idr, lo, id) {
> /* Hitting a race results in creating a new loop device which is harmless. */
> - if (lo->idr_visible && data_race(lo->lo_state) == Lo_unbound)
> + if (lo->idr_visible && data_race(READ_ONCE(lo->lo_state)) == Lo_unbound)
Please avoid the overly long line here (and maybe fix the one above).
next prev parent reply other threads:[~2025-12-15 14:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-15 9:45 [PATCH v3 1/2] loop: use READ_ONCE() to read lo->lo_state without locking Yongpeng Yang
2025-12-15 9:45 ` [PATCH v3 2/2] zloop: use READ_ONCE() to read lo->lo_state in queue_rq path Yongpeng Yang
2025-12-15 11:53 ` Damien Le Moal
2025-12-15 14:38 ` Christoph Hellwig
2025-12-15 11:52 ` [PATCH v3 1/2] loop: use READ_ONCE() to read lo->lo_state without locking Damien Le Moal
2025-12-15 14:38 ` Christoph Hellwig [this message]
2025-12-15 15:07 ` Yongpeng Yang
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=20251215143815.GA30633@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=dlemoal@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=yangyongpeng.storage@gmail.com \
--cc=yangyongpeng.storage@outlook.com \
--cc=yangyongpeng@xiaomi.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