• Mikulas Patocka's avatar
    dm: move wait queue declaration · b44ebeb0
    Mikulas Patocka authored
    Move wait queue declaration and unplug to dm_wait_for_completion.
    
    The purpose is to minimize duplicate code in the further patches.
    
    The patch reorders functions a little bit. It doesn't change any
    functionality. For proper non-deadlock operation, add_wait_queue must
    happen before set_current_state(interruptible) and before the test for
    !atomic_read(&md->pending).
    Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
    Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
    b44ebeb0
dm.c 34.7 KB