OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] Use task_pid_nr() instead of pid_nr(task_pid())
[PATCH] Use task_pid_nr() instead of pid_nr(task_pid()) [message #21223] Wed, 03 October 2007 14:26 Go to previous message
Pavel Emelianov is currently offline  Pavel Emelianov
Messages: 1149
Registered: September 2006
Senior Member
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;
 
Read Message
Read Message
Read Message
Previous Topic: [PATCH][NETNS] Move some code into __init section when CONFIG_NET_NS=n
Next Topic: [PATCH] virtualization of sysv msg queues is incomplete
Goto Forum:
  


Current Time: Tue Nov 19 01:41:00 GMT 2024

Total time taken to generate the page: 0.02997 seconds