mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 14:41:27 +00:00
[PATCH] md: avoid a deadlock when removing a device from an md array via sysfs
A device can be removed from an md array via e.g.
echo remove > /sys/block/md3/md/dev-sde/state
This will try to remove the 'dev-sde' subtree which will deadlock
since
commit e7b0d26a86
With this patch we run the kobject_del via schedule_work so as to
avoid the deadlock.
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
456a09dce9
commit
5792a2856a
2 changed files with 16 additions and 1 deletions
|
@ -104,6 +104,7 @@ struct mdk_rdev_s
|
|||
* for reporting to userspace and storing
|
||||
* in superblock.
|
||||
*/
|
||||
struct work_struct del_work; /* used for delayed sysfs removal */
|
||||
};
|
||||
|
||||
struct mddev_s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue