Lines Matching refs:mode
236 int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len) in vfs_fallocate() argument
245 if (mode & ~FALLOC_FL_SUPPORTED_MASK) in vfs_fallocate()
249 if ((mode & (FALLOC_FL_PUNCH_HOLE | FALLOC_FL_ZERO_RANGE)) == in vfs_fallocate()
254 if ((mode & FALLOC_FL_PUNCH_HOLE) && in vfs_fallocate()
255 !(mode & FALLOC_FL_KEEP_SIZE)) in vfs_fallocate()
259 if ((mode & FALLOC_FL_COLLAPSE_RANGE) && in vfs_fallocate()
260 (mode & ~FALLOC_FL_COLLAPSE_RANGE)) in vfs_fallocate()
264 if ((mode & FALLOC_FL_INSERT_RANGE) && in vfs_fallocate()
265 (mode & ~FALLOC_FL_INSERT_RANGE)) in vfs_fallocate()
274 if ((mode & ~FALLOC_FL_KEEP_SIZE) && IS_APPEND(inode)) in vfs_fallocate()
312 ret = file->f_op->fallocate(file, mode, offset, len); in vfs_fallocate()
329 SYSCALL_DEFINE4(fallocate, int, fd, int, mode, loff_t, offset, loff_t, len) in SYSCALL_DEFINE4() argument
335 error = vfs_fallocate(f.file, mode, offset, len); in SYSCALL_DEFINE4()
346 SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode) in SYSCALL_DEFINE3() argument
356 if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */ in SYSCALL_DEFINE3()
404 if ((mode & MAY_EXEC) && S_ISREG(inode->i_mode)) { in SYSCALL_DEFINE3()
414 res = inode_permission2(mnt, inode, mode | MAY_ACCESS); in SYSCALL_DEFINE3()
416 if (res || !(mode & S_IWOTH) || special_file(inode->i_mode)) in SYSCALL_DEFINE3()
443 SYSCALL_DEFINE2(access, const char __user *, filename, int, mode) in SYSCALL_DEFINE2() argument
445 return sys_faccessat(AT_FDCWD, filename, mode); in SYSCALL_DEFINE2()
534 static int chmod_common(struct path *path, umode_t mode) in chmod_common() argument
546 error = security_path_chmod(path, mode); in chmod_common()
549 newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); in chmod_common()
563 SYSCALL_DEFINE2(fchmod, unsigned int, fd, umode_t, mode) in SYSCALL_DEFINE2() argument
570 err = chmod_common(&f.file->f_path, mode); in SYSCALL_DEFINE2()
576 SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename, umode_t, mode) in SYSCALL_DEFINE3() argument
584 error = chmod_common(&path, mode); in SYSCALL_DEFINE3()
594 SYSCALL_DEFINE2(chmod, const char __user *, filename, umode_t, mode) in SYSCALL_DEFINE2() argument
596 return sys_fchmodat(AT_FDCWD, filename, mode); in SYSCALL_DEFINE2()
915 static inline int build_open_flags(int flags, umode_t mode, struct open_flags *op) in build_open_flags() argument
927 op->mode = (mode & S_IALLUGO) | S_IFREG; in build_open_flags()
929 op->mode = 0; in build_open_flags()
1000 struct file *file_open_name(struct filename *name, int flags, umode_t mode) in file_open_name() argument
1003 int err = build_open_flags(flags, mode, &op); in file_open_name()
1018 struct file *filp_open(const char *filename, int flags, umode_t mode) in filp_open() argument
1024 file = file_open_name(name, flags, mode); in filp_open()
1032 const char *filename, int flags, umode_t mode) in file_open_root() argument
1035 int err = build_open_flags(flags, mode, &op); in file_open_root()
1042 long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode) in do_sys_open() argument
1045 int fd = build_open_flags(flags, mode, &op); in do_sys_open()
1070 SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode) in SYSCALL_DEFINE3() argument
1075 return do_sys_open(AT_FDCWD, filename, flags, mode); in SYSCALL_DEFINE3()
1079 umode_t, mode) in SYSCALL_DEFINE4() argument
1084 return do_sys_open(dfd, filename, flags, mode); in SYSCALL_DEFINE4()
1093 SYSCALL_DEFINE2(creat, const char __user *, pathname, umode_t, mode) in SYSCALL_DEFINE2() argument
1095 return sys_open(pathname, O_CREAT | O_WRONLY | O_TRUNC, mode); in SYSCALL_DEFINE2()