[PATCH] Don't put_job() on def_thread
authorJens Axboe <jens.axboe@oracle.com>
Mon, 30 Oct 2006 11:23:41 +0000 (12:23 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 30 Oct 2006 11:23:41 +0000 (12:23 +0100)
It's not accounted.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
init.c

diff --git a/init.c b/init.c
index 58defbe26f648a4b93d634d169b8e507c9bbbe84..1bcd487941aee64e2e2107421968616e816e7436 100644 (file)
--- a/init.c
+++ b/init.c
@@ -432,6 +432,9 @@ static struct thread_data *get_new_job(int global, struct thread_data *parent)
 
 static void put_job(struct thread_data *td)
 {
+       if (td == &def_thread)
+               return;
+
        memset(&threads[td->thread_number - 1], 0, sizeof(*td));
        thread_number--;
 }