Fix remove_and_add_spares removes drive added as spare in slot_store
authorGoldwyn Rodrigues <rgoldwyn@suse.com>
Fri, 18 Dec 2015 04:19:16 +0000 (15:19 +1100)
committerNeilBrown <neilb@suse.com>
Fri, 18 Dec 2015 04:19:16 +0000 (15:19 +1100)
commitcb01c5496d2d9c0c862443561df16ff122db348f
tree964f7df60be4119d7b848eed64074403ac6bdd6f
parent0dc10e50f219db3f7fd66d35e5d95860ecde4213
Fix remove_and_add_spares removes drive added as spare in slot_store

Commit 2910ff17d154baa5eb50e362a91104e831eb2bb6
introduced a regression which would remove a recently added spare via
slot_store. Revert part of the patch which touches slot_store() and add
the disk directly using pers->hot_add_disk()

Fixes: 2910ff17d154 ("md: remove_and_add_spares() to activate specific
rdev")
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
Signed-off-by: NeilBrown <neilb@suse.com>
drivers/md/md.c