Thread (11 messages) 11 messages, 2 authors, 2019-08-22

Re: [PATCH] block: don't acquire .sysfs_lock before removing mq & iosched kobjects

From: Bart Van Assche <bvanassche@acm.org>
Date: 2019-08-21 15:41:36

On 8/20/19 8:00 PM, Ming Lei wrote:
On Tue, Aug 20, 2019 at 02:21:10PM -0700, Bart Van Assche wrote:
quoted
-	/*
-	 * 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help