Skip to content

Commit 84f90ab

Browse files
oleg-nesterovbrauner
authored andcommitted
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>
1 parent 1cf2e88 commit 84f90ab

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

fs/pidfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ static long pidfd_info(struct file *file, unsigned int cmd, unsigned long arg)
446446
* the fields are set correctly, or return ESRCH to avoid providing
447447
* incomplete information. */
448448

449-
kinfo.ppid = task_ppid_nr_ns(task, NULL);
449+
kinfo.ppid = task_ppid_vnr(task);
450450
kinfo.tgid = task_tgid_vnr(task);
451451
kinfo.pid = task_pid_vnr(task);
452452
kinfo.mask |= PIDFD_INFO_PID;

include/linux/pid.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,11 @@ static inline pid_t task_ppid_nr_ns(const struct task_struct *tsk, struct pid_na
310310
return pid;
311311
}
312312

313+
static inline pid_t task_ppid_vnr(const struct task_struct *tsk)
314+
{
315+
return task_ppid_nr_ns(tsk, NULL);
316+
}
317+
313318
static inline pid_t task_ppid_nr(const struct task_struct *tsk)
314319
{
315320
return task_ppid_nr_ns(tsk, &init_pid_ns);

0 commit comments

Comments
 (0)