[PATCH 30/33] tur: Add pthread_testcancel()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hannes Reinecke <hare@xxxxxxx>

When the ioctl returns we need to check if a cancellation has
been requested; otherwise we'd be re-setting the state and
overwrite any pending values.


Signed-off-by: Hannes Reinecke <hare@xxxxxxxx>
---
 libmultipath/checkers/tur.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
index d9a9e67d..b4a5cb2f 100644
--- a/libmultipath/checkers/tur.c
+++ b/libmultipath/checkers/tur.c
@@ -268,6 +268,7 @@ static void *tur_thread(void *ctx)
 	pthread_mutex_unlock(&ct->lock);
 
 	state = tur_check(ct->fd, ct->timeout, copy_msg_to_tcc, ct->message);
+	pthread_testcancel();
 
 	/* TUR checker done */
 	pthread_mutex_lock(&ct->lock);
-- 
2.11.0

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux