btrfs-progs: tasks info->id is a pthread_t and should not set to -1

Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Silvio Fricke 2015-09-24 08:13:04 +02:00 committed by David Sterba
parent f22e40f978
commit 6a1336fab6
1 changed files with 2 additions and 2 deletions

View File

@ -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) {