summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2007-04-05 04:08:18 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-05 06:12:47 +0200
commit5792a2856a63cdc568e08a7d6f9b2413d9217b3e (patch)
tree042a09fbfdf75dac5efa3bf61c7d6c6dd4c6ba7f /include
parent[PATCH] kernel/time.c: add missing symbol exports (diff)
downloadlinux-5792a2856a63cdc568e08a7d6f9b2413d9217b3e.tar.xz
linux-5792a2856a63cdc568e08a7d6f9b2413d9217b3e.zip
[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 e7b0d26a86943370c04d6833c6edba2a72a6e240 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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/raid/md_k.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index 8245c282168b..de72c49747c8 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -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