]> git.baikalelectronics.ru Git - kernel.git/commit
md: disconnect device from personality before trying to remove it.
authorNeilBrown <neilb@suse.com>
Thu, 2 Jun 2016 06:19:52 +0000 (16:19 +1000)
committerShaohua Li <shli@fb.com>
Mon, 13 Jun 2016 18:54:12 +0000 (11:54 -0700)
commitbb3f40b70ac74bb608a1e063ea9a82e56910b742
tree4facf6ea5e596b014ceff1792de6006b3cb6bb27
parent538730a06358363817a1d6cf0ff60934a3b070c5
md: disconnect device from personality before trying to remove it.

When the HOT_REMOVE_DISK ioctl is used to remove a device, we
call remove_and_add_spares() which will remove it from the personality
if possible.  This improves the chances that the removal will succeed.

When writing "remove" to dev-XX/state, we don't.  So that can fail more easily.

So add the remove_and_add_spares() into "remove" handling.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/md.c