• NeilBrown's avatar
    md: fix deadlock error in recent patch. · d47c8ad2
    NeilBrown authored
    A recent patch aimed to cause md_write_start() to fail (rather than
    block) when the mddev was suspending, so as to avoid deadlocks.
    Unfortunately the test in wait_event() was wrong, and it didn't change
    behaviour at all.
    
    We wait_event() must wait until the metadata is written OR the array is
    suspending.
    
    Fixes: cc27b0c7 ("md: fix deadlock between mddev_suspend() and md_write_start()")
    Cc: stable@vger.kernel.org
    Reported-by: default avatarXiao Ni <xni@redhat.com>
    Signed-off-by: default avatarNeilBrown <neilb@suse.com>
    Signed-off-by: default avatarShaohua Li <shli@fb.com>
    d47c8ad2
md.c 242 KB