From 6a1336fab65b999b760f5760ddae723265dd834e Mon Sep 17 00:00:00 2001 From: Silvio Fricke Date: Thu, 24 Sep 2015 08:13:04 +0200 Subject: [PATCH] btrfs-progs: tasks info->id is a pthread_t and should not set to -1 Signed-off-by: Silvio Fricke Signed-off-by: David Sterba --- task-utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/task-utils.c b/task-utils.c index 58f5195..a4017ff 100644 --- a/task-utils.c +++ b/task-utils.c @@ -51,7 +51,7 @@ int task_start(struct task_info *info) info->private_data); if (ret) - info->id = -1; + info->id = 0; return ret; } @@ -64,7 +64,7 @@ void task_stop(struct task_info *info) if (info->id > 0) { pthread_cancel(info->id); pthread_join(info->id, NULL); - info->id = -1; + info->id = 0; } if (info->periodic.timer_fd) { -- 2.7.4