From: Jan Kara <jack@suse.cz>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jan Kara <jack@suse.cz>, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, Tejun Heo <tj@kernel.org>,
Paolo Valente <paolo.valente@linaro.org>,
Logan Gunthorpe <logang@deltatee.com>,
Donald Buczek <buczek@molgen.mpg.de>,
stable@vger.kernel.org
Subject: Re: [PATCH] block: fix bio_clone_blkg_association() to associate with proper blkcg_gq
Date: Thu, 2 Jun 2022 09:30:47 +0200 [thread overview]
Message-ID: <20220602073047.2utry7gvjlu2xoyh@quack3.lan> (raw)
In-Reply-To: <YpelCJ66S9KaYg+0@infradead.org>
On Wed 01-06-22 10:42:32, Christoph Hellwig wrote:
> On Wed, Jun 01, 2022 at 06:34:05PM +0200, Jan Kara wrote:
> > --- a/block/blk-cgroup.c
> > +++ b/block/blk-cgroup.c
> > @@ -1975,10 +1975,9 @@ EXPORT_SYMBOL_GPL(bio_associate_blkg);
> > void bio_clone_blkg_association(struct bio *dst, struct bio *src)
> > {
> > if (src->bi_blkg) {
> > + rcu_read_lock();
> > + bio_associate_blkg_from_css(dst, bio_blkcg_css(src));
> > + rcu_read_unlock();
>
> What do we even need the rcu critical section here?
Good question. I've just blindly copied it from bio_associate_blkg() but
bio_blkcg_css(src) is safe without RCU (we hold object references for all
the dereferences) and bio_associate_blkg_from_css() takes RCU lock in
blkg_tryget_closest() which is the only place where it needs it. So no, we
don't need the RCU lock there. Thanks for noticing. I'll send V2 shortly
with your change and the added tags.
> Otherwise looks good:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
Thanks for review!
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2022-06-02 7:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-01 16:34 [PATCH] block: fix bio_clone_blkg_association() to associate with proper blkcg_gq Jan Kara
2022-06-01 17:42 ` Christoph Hellwig
2022-06-02 7:30 ` Jan Kara [this message]
2022-06-01 19:58 ` Donald Buczek
-- strict thread matches above, loose matches on Subject: below --
2022-06-08 11:45 Jan Kara
2022-06-08 12:06 ` Greg KH
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=20220602073047.2utry7gvjlu2xoyh@quack3.lan \
--to=jack@suse.cz \
--cc=axboe@kernel.dk \
--cc=buczek@molgen.mpg.de \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=paolo.valente@linaro.org \
--cc=stable@vger.kernel.org \
--cc=tj@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