From 7bead7ac289557853d5cae2aa4ed4e4429622852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Tue, 8 Sep 2015 19:41:19 +0000 Subject: [PATCH] drm/ttm: Drain taskqueue if taskqueue_cancel_timeout() returned an error Before, this was done if `pending` was true. This is not what the manpage suggests and not what was done elsewhere in the same file. --- sys/dev/drm2/ttm/ttm_bo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/drm2/ttm/ttm_bo.c b/sys/dev/drm2/ttm/ttm_bo.c index 64364d5607e..70e17c4f416 100644 --- a/sys/dev/drm2/ttm/ttm_bo.c +++ b/sys/dev/drm2/ttm/ttm_bo.c @@ -789,8 +789,7 @@ int ttm_bo_lock_delayed_workqueue(struct ttm_bo_device *bdev) { int pending; - taskqueue_cancel_timeout(taskqueue_thread, &bdev->wq, &pending); - if (pending) + if (taskqueue_cancel_timeout(taskqueue_thread, &bdev->wq, &pending)) taskqueue_drain_timeout(taskqueue_thread, &bdev->wq); return (pending); }