mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nikanth Karthikesan <knikanth@suse.de>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] increment nr_tasks in io_context when CLONE_IO is set
Date: Tue, 15 Apr 2008 03:50:25 +0000	[thread overview]
Message-ID: <1208231425.27984.9.camel@zero100.blr.novell.com> (raw)

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



             reply	other threads:[~2008-04-15  3:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-15  3:50 Nikanth Karthikesan [this message]
2008-04-15  7:24 ` Jens Axboe
     [not found] ` <4804A6CF.BANGALORE.BLR.100.174746A.1.15A79.1@1:7.BANGALORE.BLR.100.0.1.0.1@16>
2008-04-16  3:35   ` Nikanth Karthikesan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1208231425.27984.9.camel@zero100.blr.novell.com \
    --to=knikanth@suse.de \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®