diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-06-16 11:56:43 +0530 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-06-16 11:56:43 +0530 |
| commit | 59b1c2aa064fdc4b91a26dce83697fea47cd0a61 (patch) | |
| tree | 8a3f7f932c4c783970a88f10ea5ca9b506e56eaa /include/linux | |
| parent | 6271f6ea7f65191762efe17c1a7d33f8922e1eeb (diff) | |
| parent | 82c6dd20479bb6a9625e1d63a650c3be8865e2db (diff) | |
Merge tag 'fsnotify_for_v7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull fsnotify updates from Jan Kara:
- fanotify improvements for pidfd reporting
- small cleanup in fanotify_error_event_equal
* tag 'fsnotify_for_v7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
fanotify: allow reporting pidfds for reaped tasks
fanotify: report thread pidfds for FAN_REPORT_TID
fanotify: simplify fanotify_error_event_equal
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pidfs.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/linux/pidfs.h b/include/linux/pidfs.h index 416bdff4d6ce..0abf7da9ab23 100644 --- a/include/linux/pidfs.h +++ b/include/linux/pidfs.h @@ -2,6 +2,8 @@ #ifndef _LINUX_PID_FS_H #define _LINUX_PID_FS_H +#include <linux/gfp_types.h> + struct coredump_params; struct file *pidfs_alloc_file(struct pid *pid, unsigned int flags); @@ -14,7 +16,21 @@ void pidfs_exit(struct task_struct *tsk); void pidfs_coredump(const struct coredump_params *cprm); #endif extern const struct dentry_operations pidfs_dentry_operations; -int pidfs_register_pid(struct pid *pid); +int pidfs_register_pid_gfp(struct pid *pid, gfp_t gfp); + +/** + * pidfs_register_pid - register a struct pid in pidfs + * @pid: pid to pin + * + * Register a struct pid in pidfs. + * + * Return: On success zero, on error a negative error code is returned. + */ +static inline int pidfs_register_pid(struct pid *pid) +{ + return pidfs_register_pid_gfp(pid, GFP_KERNEL); +} + void pidfs_free_pid(struct pid *pid); #endif /* _LINUX_PID_FS_H */ |
