test Blog
Happy living

[PATCH 3/3] pidns: remove find_task_by_pid, unused for a long time

老鼠 posted @ 2009年4月02日 01:41 in patch , 2650 阅读

Date Mon, 09 Jun 2008 18:46:00 +0400
From Pavel Emelyanov <>
Subject [PATCH 3/3] pidns: remove find_task_by_pid, unused for a long time

It seems to me that it was a mistake marking this function as
deprecated and scheduling it for removal, rather than resolutely
removing it after the last caller's death.

Anyway - better late, then never.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

---
 Documentation/feature-removal-schedule.txt |   18 ------------------
 include/linux/pid.h                        |    2 +-
 include/linux/sched.h                      |    6 ------
 3 files changed, 1 insertions(+), 25 deletions(-)
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 41013d4..44d515b 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -138,24 +138,6 @@ Who:	Kay Sievers <kay.sievers@suse.de>
 
 ---------------------------
 
-What:	find_task_by_pid
-When:	2.6.26
-Why:	With pid namespaces, calling this funciton will return the
-	wrong task when called from inside a namespace.
-
-	The best way to save a task pid and find a task by this
-	pid later, is to find this task's struct pid pointer (or get
-	it directly from the task) and call pid_task() later.
-
-	If someone really needs to get a task by its pid_t, then
-	he most likely needs the find_task_by_vpid() to get the
-	task from the same namespace as the current task is in, but
-	this may be not so in general.
-
-Who:	Pavel Emelyanov <xemul@openvz.org>
-
----------------------------
-
 What:	ACPI procfs interface
 When:	July 2008
 Why:	ACPI sysfs conversion should be finished by January 2008.
diff --git a/include/linux/pid.h b/include/linux/pid.h
index ff1b2a5..22921ac 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -107,7 +107,7 @@ extern struct pid_namespace init_pid_ns;
  * find_pid_ns() finds the pid in the namespace specified
  * find_vpid() finr the pid by its virtual id, i.e. in the current namespace
  *
- * see also find_task_by_pid() set in include/linux/sched.h
+ * see also find_task_by_vpid() set in include/linux/sched.h
  */
 extern struct pid *find_pid_ns(int nr, struct pid_namespace *ns);
 extern struct pid *find_vpid(int nr);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 7c0443b..b3907c6 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1707,8 +1707,6 @@ extern struct pid_namespace init_pid_ns;
  *      finds a task by its pid in the specified namespace
  * find_task_by_vpid():
  *      finds a task by its virtual pid
- * find_task_by_pid():
- *      finds a task by its global pid
  *
  * see also find_vpid() etc in include/linux/pid.h
  */
@@ -1716,10 +1714,6 @@ extern struct pid_namespace init_pid_ns;
 extern struct task_struct *find_task_by_pid_type_ns(int type, int pid,
 		struct pid_namespace *ns);
 
-static inline struct task_struct *__deprecated find_task_by_pid(pid_t nr)
-{
-	return find_task_by_pid_type_ns(PIDTYPE_PID, nr, &init_pid_ns);
-}
 extern struct task_struct *find_task_by_vpid(pid_t nr);
 extern struct task_struct *find_task_by_pid_ns(pid_t nr,
 		struct pid_namespace *ns);
-- 
1.5.3.4


Safeway Nearby 说:
2023年1月19日 17:10

This is common in the United States, and there are food, gasoline, and pharmacy establishments. The locate me icon on the official website does assist you in quickly locating any of the stores or fuel centers. Shopping gets simple as they present all types of items from various companies. Safeway Nearby Safe Way employees are well-prepared to assist customers on their shopping trips. Safe Way has a direct relationship with farmers and stores the original items for users. Every day, berries are directly carried from the distribution facility. To receive their fresh and high-quality products, go to your local store and start shopping.

Maha Board 1st Clas 说:
2023年9月20日 19:09

Maharashtra Board 1st Class Exam Date Sheet 2024 Available at Official Website www.mscepune.in, This Maha Board Primary School Exam Attended Every Year More than 50 Laks of Students, MSCE Pune Little Students Studying Maharashtra Class Revised Syllabus 2024 helps Students to Learn Logic and order and hence,Maharashtra Elementary Syllabus 2024 is Designed in Accordance with the NCERT Based Maha Board 1st Class Syllabus 2024 Guidelines and helps Students to get an Overview of the Marathi, English Medium All Subject, Students Should Perform well in the Exam, which is Possible by Understanding the Syllabus and Studying Accordingly.To Prepare well for the Maharashtra Class get Promoted to the next Standard, Understanding of the syllabus of Maharashtra State Board for each subject is essential


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter