Lines Matching defs:file

36 #include <linux/file.h>
615 struct file *exe_file;
649 /* No ordering required: file already has been exposed. */
669 struct file *file;
734 file = tmp->vm_file;
735 if (file) {
736 struct address_space *mapping = file->f_mapping;
738 get_file(file);
1392 * set_mm_exe_file - change a reference to the mm's executable file
1394 * @new_exe_file: The new file to use.
1396 * This changes mm's executable file (shown as symlink /proc/[pid]/exe).
1404 int set_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file)
1406 struct file *old_exe_file;
1433 * replace_mm_exe_file - replace a reference to the mm's executable file
1435 * @new_exe_file: The new file to use.
1437 * This changes mm's executable file (shown as symlink /proc/[pid]/exe).
1441 int replace_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file)
1444 struct file *old_exe_file;
1447 /* Forbid mm->exe_file change if old file still mapped. */
1472 /* set the new file */
1486 * get_mm_exe_file - acquire a reference to the mm's executable file
1489 * Returns %NULL if mm has no associated executable file.
1490 * User must release file via fput().
1492 struct file *get_mm_exe_file(struct mm_struct *mm)
1494 struct file *exe_file;
1503 * get_task_exe_file - acquire a reference to the task's executable file
1506 * Returns %NULL if task's mm (if any) has no associated executable file or
1508 * User must release file via fput().
1510 struct file *get_task_exe_file(struct task_struct *task)
1512 struct file *exe_file = NULL;
1996 * @ret: Where to return the file for the pidfd.
1998 * Allocate a new file that stashes @pid and reserve a new pidfd number in the
1999 * caller's file descriptor table. The pidfd is reserved but not installed yet.
2003 * pidfd file are prepared.
2006 * call fd_install() passing the returned pidfd and pidfd file as arguments in
2007 * order to install the pidfd into its file descriptor table or they must use
2008 * put_unused_fd() and fput() on the returned pidfd and pidfd file
2013 * that no pidfd is leaked into its file descriptor table.
2016 * pidfd file is returned in the last argument to the function. On
2020 static int __pidfd_prepare(struct pid *pid, unsigned int flags, struct file **ret)
2023 struct file *pidfd_file;
2049 * Allocate a new file that stashes @pid and reserve a new pidfd number in the
2050 * caller's file descriptor table. The pidfd is reserved but not installed yet.
2056 * call fd_install() passing the returned pidfd and pidfd file as arguments in
2057 * order to install the pidfd into its file descriptor table or they must use
2058 * put_unused_fd() and fput() on the returned pidfd and pidfd file
2063 * that no pidfd is leaked into its file descriptor table.
2066 * pidfd file is returned in the last argument to the function. On
2070 int pidfd_prepare(struct pid *pid, unsigned int flags, struct file **ret)
2143 struct file *pidfile = NULL;
2415 * This has to happen after we've potentially unshared the file
3247 * Unshare file descriptor table if it is being shared