mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 15:36:55 +08:00
pid: introduce task_ppid_vnr() helper
Cosmetic change. Unlike all other similar helpers task_ppid_nr_ns() doesn't have a _vnr() version; add one for consistency. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Link: https://patch.msgid.link/20251015123633.GB9456@redhat.com Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
committed by
Christian Brauner
parent
1cf2e88e06
commit
84f90ab5d3
@@ -446,7 +446,7 @@ static long pidfd_info(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
* the fields are set correctly, or return ESRCH to avoid providing
|
||||
* incomplete information. */
|
||||
|
||||
kinfo.ppid = task_ppid_nr_ns(task, NULL);
|
||||
kinfo.ppid = task_ppid_vnr(task);
|
||||
kinfo.tgid = task_tgid_vnr(task);
|
||||
kinfo.pid = task_pid_vnr(task);
|
||||
kinfo.mask |= PIDFD_INFO_PID;
|
||||
|
||||
@@ -310,6 +310,11 @@ static inline pid_t task_ppid_nr_ns(const struct task_struct *tsk, struct pid_na
|
||||
return pid;
|
||||
}
|
||||
|
||||
static inline pid_t task_ppid_vnr(const struct task_struct *tsk)
|
||||
{
|
||||
return task_ppid_nr_ns(tsk, NULL);
|
||||
}
|
||||
|
||||
static inline pid_t task_ppid_nr(const struct task_struct *tsk)
|
||||
{
|
||||
return task_ppid_nr_ns(tsk, &init_pid_ns);
|
||||
|
||||
Reference in New Issue
Block a user