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.
