Skip to content

Commit

Permalink
Use task_pid_nr() instead of pid_nr(task_pid())
Browse files Browse the repository at this point in the history
There are two places that do so - the cgroups subsystem and the autofs
code.

Signed-off-by: Pavel Emelyanov <[email protected]>
Cc: Ian Kent <[email protected]>
Cc: Paul Menage <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
xemul authored and Linus Torvalds committed Oct 19, 2007
1 parent 6651fd5 commit 69cccb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/autofs/root.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ static struct dentry *autofs_root_lookup(struct inode *dir, struct dentry *dentr

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

Expand Down
2 changes: 1 addition & 1 deletion kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1763,7 +1763,7 @@ static int pid_array_load(pid_t *pidarray, int npids, struct cgroup *cont)
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;
Expand Down

0 comments on commit 69cccb8

Please sign in to comment.