Skip to content
Commit ed9bfdf1 authored by NeilBrown's avatar NeilBrown
Browse files

md: raid1/raid10: handle allocation errors during array setup.



Both raid1 and raid10 create a mempool during startup.
If the 'alloc' function for this mempool fails, unplug_slaves
is called.
If that happens when the pool is being initialised, unplug_slaves
will try to use the 'conf' structure that isn't filled in yet, and
badness will happen.

So ensure that unplug_slaves doesn't get called unless we know
that the conf structure if fully initialised.

Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent f5efd45a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment