[PATCH 1/2] btrfs-progs: tasks info->id is a pthread_t and should not set to -1

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

 



Signed-off-by: Silvio Fricke <silvio.fricke@xxxxxxxxx>
---
 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.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux