Lines Matching refs:file
893 static int validate_mmap_request(struct file *file, in validate_mmap_request() argument
924 if (file) { in validate_mmap_request()
926 if (!file->f_op->mmap) in validate_mmap_request()
933 if (file->f_op->mmap_capabilities) { in validate_mmap_request()
934 capabilities = file->f_op->mmap_capabilities(file); in validate_mmap_request()
938 switch (file_inode(file)->i_mode & S_IFMT) { in validate_mmap_request()
958 if (!file->f_op->get_unmapped_area) in validate_mmap_request()
960 if (!(file->f_mode & FMODE_CAN_READ)) in validate_mmap_request()
964 if (!(file->f_mode & FMODE_READ)) in validate_mmap_request()
970 !(file->f_mode & FMODE_WRITE)) in validate_mmap_request()
973 if (IS_APPEND(file_inode(file)) && in validate_mmap_request()
974 (file->f_mode & FMODE_WRITE)) in validate_mmap_request()
977 if (locks_verify_locked(file)) in validate_mmap_request()
1012 if (path_noexec(&file->f_path)) { in validate_mmap_request()
1054 static unsigned long determine_vm_flags(struct file *file, in determine_vm_flags() argument
1067 if (file && !(prot & PROT_WRITE)) in determine_vm_flags()
1205 unsigned long do_mmap(struct file *file, in do_mmap() argument
1225 ret = validate_mmap_request(file, addr, len, prot, flags, pgoff, in do_mmap()
1236 vm_flags |= determine_vm_flags(file, prot, flags, capabilities); in do_mmap()
1255 if (file) { in do_mmap()
1256 region->vm_file = get_file(file); in do_mmap()
1257 vma->vm_file = get_file(file); in do_mmap()
1285 file_inode(file)) in do_mmap()
1340 addr = file->f_op->get_unmapped_area(file, addr, len, in do_mmap()
1367 if (file && vma->vm_flags & VM_SHARED) in do_mmap()
1434 struct file *file = NULL; in SYSCALL_DEFINE6() local
1439 file = fget(fd); in SYSCALL_DEFINE6()
1440 if (!file) in SYSCALL_DEFINE6()
1446 retval = vm_mmap_pgoff(file, addr, len, prot, flags, pgoff); in SYSCALL_DEFINE6()
1448 if (file) in SYSCALL_DEFINE6()
1449 fput(file); in SYSCALL_DEFINE6()
1789 unsigned long arch_get_unmapped_area(struct file *file, unsigned long addr, in arch_get_unmapped_area() argument