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>
* 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;
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);