multipathd: remove incorrect pthread_testcancel
authorBenjamin Marzinski <bmarzins@redhat.com>
Fri, 30 Mar 2018 03:36:58 +0000 (22:36 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Fri, 11 May 2018 08:42:37 +0000 (10:42 +0200)
As Martin Wilck pointed out, a thread that's trying to stop the waiter
thread should not cancel itself before it gets a chance to do so

Cc: Martin Wilck <mwilck@suse.com>
Fixes: c7625f92 "multipathd: fix waiter thread cancelling"
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
multipathd/waiter.c

index 595c69a..0ef8b25 100644 (file)
@@ -68,7 +68,6 @@ void stop_waiter_thread (struct multipath *mpp, struct vectors *vecs)
        mpp->waiter = (pthread_t)0;
        pthread_cleanup_push(cleanup_lock, &waiter_lock);
        lock(&waiter_lock);
-       pthread_testcancel();
        pthread_kill(thread, SIGUSR2);
        pthread_cancel(thread);
        lock_cleanup_pop(&waiter_lock);