• NeilBrown's avatar
    md/raid10: always initialise ->state on newly allocated r10_bio · cb8b12b5
    NeilBrown authored
    Most places which allocate an r10_bio zero the ->state, some don't.
    As the r10_bio comes from a mempool, and the allocation function uses
    kzalloc it is often zero anyway.  But sometimes it isn't and it is
    best to be safe.
    
    I only noticed this because of the bug fixed by an earlier patch
    where the r10_bios allocated for a reshape were left around to
    be used by a subsequent resync.  In that case the R10BIO_IsReshape
    flag caused problems.
    Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    cb8b12b5
raid10.c 131 KB