Lines Matching defs:file
3 #include <linux/file.h>
162 struct file *exe_file;
318 /* file name of executable */
529 static void wait_for_dump_helpers(struct file *file)
531 struct pipe_inode_info *pipe = file->private_data;
565 struct file *files[2];
571 cp->file = files[1];
658 * we're not writing to the file system, but we use
728 * Unlink the file if it exists unless this is a SUID
742 * file, but if that causes an EEXIST here, that's
763 cprm.file = file_open_root(&root, cn.corename,
767 cprm.file = filp_open(cn.corename, open_flags, 0600);
769 if (IS_ERR(cprm.file))
772 inode = file_inode(cprm.file);
775 if (d_unhashed(cprm.file->f_path.dentry))
785 * of the file during file creation. This is an issue when
793 if (!(cprm.file->f_mode & FMODE_CAN_WRITE))
795 if (do_truncate(cprm.file->f_path.dentry, 0, 0, cprm.file))
810 if (!cprm.file) {
817 file_start_write(cprm.file);
819 file_end_write(cprm.file);
823 wait_for_dump_helpers(cprm.file);
825 if (cprm.file)
826 filp_close(cprm.file, NULL);
843 * do on a core-file: use only these functions to write out all the
848 struct file *file = cprm->file;
849 loff_t pos = file->f_pos;
857 n = __kernel_write(file, addr, nr, &pos);
860 file->f_pos = pos;
871 struct file *file = cprm->file;
872 if (file->f_op->llseek && file->f_op->llseek != no_llseek) {
874 file->f_op->llseek(file, nr, SEEK_CUR) < 0)
933 * Ensures that file size is big enough to contain the current file
934 * postion. This prevents gdb from complaining about a truncated file
935 * if the last "write" to the file was dump_skip.
939 struct file *file = cprm->file;
942 if (file->f_op->llseek && file->f_op->llseek != no_llseek) {
943 offset = file->f_op->llseek(file, 0, SEEK_CUR);
944 if (i_size_read(file->f_mapping->host) < offset)
945 do_truncate(file->f_path.dentry, offset, 0, file);
1020 /* By default, dump shared memory if mapped from an anonymous file. */
1038 * If this is the beginning of an executable file mapping,
1097 struct file *file = cprm->vma_meta[i].file;
1098 if (file)
1099 fput(file);
1144 m->file = vma->vm_file;
1145 if (m->file)
1146 get_file(m->file);