Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346462
b: refs/heads/master
c: a5ba911
h: refs/heads/master
v: v3
  • Loading branch information
Gao feng authored and Linus Torvalds committed Dec 18, 2012
1 parent 066a0b1 commit 660c820
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d740269867021faf4ce38a449353d2b986c34a67
refs/heads/master: a5ba911ec3792168530d35e16a8ec3b6fc60bcb5
6 changes: 0 additions & 6 deletions trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -1778,12 +1778,6 @@ static inline int is_global_init(struct task_struct *tsk)
return tsk->pid == 1;
}

/*
* is_container_init:
* check whether in the task is init in its own pid namespace.
*/
extern int is_container_init(struct task_struct *tsk);

extern struct pid *cad_pid;

extern void free_task(struct task_struct *tsk);
Expand Down
15 changes: 0 additions & 15 deletions trunk/kernel/pid.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,6 @@ struct pid_namespace init_pid_ns = {
};
EXPORT_SYMBOL_GPL(init_pid_ns);

int is_container_init(struct task_struct *tsk)
{
int ret = 0;
struct pid *pid;

rcu_read_lock();
pid = task_pid(tsk);
if (pid != NULL && pid->numbers[pid->level].nr == 1)
ret = 1;
rcu_read_unlock();

return ret;
}
EXPORT_SYMBOL(is_container_init);

/*
* Note: disable interrupts while the pidmap_lock is held as an
* interrupt might come in and do read_lock(&tasklist_lock).
Expand Down

0 comments on commit 660c820

Please sign in to comment.