From: Bart Van Assche <bvanassche@acm.org>
To: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, Greg KH <gregkh@linuxfoundation.org>,
Mike Snitzer <snitzer@redhat.com>
Subject: Re: [PATCH] block: don't acquire .sysfs_lock before removing mq & iosched kobjects
Date: Wed, 21 Aug 2019 08:41:32 -0700 [thread overview]
Message-ID: <d27b430e-ed9b-7de7-5947-c93f1753c529@acm.org> (raw)
In-Reply-To: <20190821030052.GD24167@ming.t460p>
On 8/20/19 8:00 PM, Ming Lei wrote:
> On Tue, Aug 20, 2019 at 02:21:10PM -0700, Bart Van Assche wrote:
>> - /*
>> - * Remove the sysfs attributes before unregistering the queue data
>> - * structures that can be modified through sysfs.
>> - */
>> if (queue_is_mq(q))
>> - blk_mq_unregister_dev(disk_to_dev(disk), q);
>> - mutex_unlock(&q->sysfs_lock);
>> -
>> + kobject_uevent(q->mq_kobj, KOBJ_REMOVE);
>
> Could you explain why you move the above line here?
I'm not sure whether kobject_del() deletes any objects attached to the
deleted kobj. This change ensures that kobject_uevent() is called before
the parent object of q->mq_kobj is deleted.
Bart.
next prev parent reply other threads:[~2019-08-21 15:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-16 13:55 [PATCH] block: don't acquire .sysfs_lock before removing mq & iosched kobjects Ming Lei
2019-08-16 15:14 ` Bart Van Assche
2019-08-19 8:15 ` Ming Lei
2019-08-20 21:07 ` Bart Van Assche
2019-08-21 2:45 ` Ming Lei
2019-08-16 15:31 ` Bart Van Assche
2019-08-16 15:45 ` Ming Lei
2019-08-20 21:21 ` Bart Van Assche
2019-08-21 3:00 ` Ming Lei
2019-08-21 15:41 ` Bart Van Assche [this message]
2019-08-22 1:16 ` Ming Lei
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=d27b430e-ed9b-7de7-5947-c93f1753c529@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=gregkh@linuxfoundation.org \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=snitzer@redhat.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