mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Pavel Emelyanov <xemul@openvz.org>
Cc: linux-kernel@vger.kernel.org, devel@openvz.org, hpa@zytor.com,
	menage@google.com
Subject: Re: [PATCH] Use task_pid_nr() instead of pid_nr(task_pid())
Date: Fri, 5 Oct 2007 16:15:21 -0700	[thread overview]
Message-ID: <20071005161521.cae8c531.akpm@linux-foundation.org> (raw)
In-Reply-To: <4703A67E.1070209@openvz.org>

On Wed, 03 Oct 2007 18:26:06 +0400
Pavel Emelyanov <xemul@openvz.org> wrote:

> There are two places that do so - the cgroups subsystem 
> and the autofs code.
> 
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
> 
> ---
> 
> diff --git a/fs/autofs/root.c b/fs/autofs/root.c
> index 592f640..5efff3c 100644
> --- a/fs/autofs/root.c
> +++ b/fs/autofs/root.c
> @@ -214,7 +214,7 @@ static struct dentry *autofs_root_lookup
>  
>  	oz_mode = autofs_oz_mode(sbi);
>  	DPRINTK(("autofs_lookup: pid = %u, pgrp = %u, catatonic = %d, "
> -				"oz_mode = %d\n", pid_nr(task_pid(current)),
> +				"oz_mode = %d\n", task_pid_nr(current),
>  				task_pgrp_nr(current), sbi->catatonic,
>  				oz_mode));
>  
> diff --git a/kernel/cgroup.c b/kernel/cgroup.c
> index 1e8aa53..8720881 100644
> --- a/kernel/cgroup.c
> +++ b/kernel/cgroup.c
> @@ -1762,7 +1762,7 @@ static int pid_array_load(pid_t *pidarra
>  	while ((tsk = cgroup_iter_next(cont, &it))) {
>  		if (unlikely(n == npids))
>  			break;
> -		pidarray[n++] = pid_nr(task_pid(tsk));
> +		pidarray[n++] = task_pid_nr(tsk);
>  	}
>  	cgroup_iter_end(cont, &it);
>  	return n;

And more will appear over time unless we remove pid_nr() altogether.

Can we do that?

  reply	other threads:[~2007-10-05 23:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-03 14:26 Pavel Emelyanov
2007-10-05 23:15 ` Andrew Morton [this message]
2007-10-08  8:57   ` Pavel Emelyanov

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=20071005161521.cae8c531.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=devel@openvz.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --cc=xemul@openvz.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

Powered by JetHome