• N
    md: raid1/raid10: handle allocation errors during array setup. · ed9bfdf1
    NeilBrown 提交于
    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: NNeilBrown <neilb@suse.de>
    ed9bfdf1
raid10.c 62.0 KB