Unverified Commit 84f90ab5 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Christian Brauner
Browse files

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: default avatarOleg Nesterov <oleg@redhat.com>
Link: https://patch.msgid.link/20251015123633.GB9456@redhat.com


Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 1cf2e88e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+5 −0
Original line number Diff line number Diff line
@@ -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);