lkml.org 
[lkml]   [2008]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] increment nr_tasks in io_context when CLONE_IO is set
From
Date
Increment the nr_tasks associated with the io_context when CLONE_IO flag
is set.

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>

--
diff --git a/kernel/fork.c b/kernel/fork.c
index dd249c3..01e843b 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -812,6 +812,7 @@ static int copy_io(unsigned long clone_f
tsk->io_context = ioc_task_link(ioc);
if (unlikely(!tsk->io_context))
return -ENOMEM;
+ atomic_inc(&tsk->io_context->nr_tasks);
} else if (ioprio_valid(ioc->ioprio)) {
tsk->io_context = alloc_io_context(GFP_KERNEL, -1);
if (unlikely(!tsk->io_context))



\
 
 \ /
  Last update: 2008-04-15 05:57    [W:0.050 / U:1.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site