• Home
  • Raw
  • Download

Lines Matching refs:flags

421 static long do_faccessat(int dfd, const char __user *filename, int mode, int flags)  in do_faccessat()  argument
432 if (flags & ~(AT_EACCESS | AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH)) in do_faccessat()
435 if (flags & AT_SYMLINK_NOFOLLOW) in do_faccessat()
437 if (flags & AT_EMPTY_PATH) in do_faccessat()
440 if (!(flags & AT_EACCESS)) { in do_faccessat()
499 int, flags) in SYSCALL_DEFINE4() argument
501 return do_faccessat(dfd, filename, mode, flags); in SYSCALL_DEFINE4()
1018 struct file *dentry_open(const struct path *path, int flags, in dentry_open() argument
1029 f = alloc_empty_file(flags, cred); in dentry_open()
1058 struct file *dentry_create(const struct path *path, int flags, umode_t mode, in dentry_create() argument
1065 f = alloc_empty_file(flags, cred); in dentry_create()
1083 struct file *open_with_fake_path(const struct path *path, int flags, in open_with_fake_path() argument
1086 struct file *f = alloc_empty_file_noaccount(flags, cred); in open_with_fake_path()
1101 #define WILL_CREATE(flags) (flags & (O_CREAT | __O_TMPFILE)) argument
1104 inline struct open_how build_open_how(int flags, umode_t mode) in build_open_how() argument
1107 .flags = flags & VALID_OPEN_FLAGS, in build_open_how()
1112 if (how.flags & O_PATH) in build_open_how()
1113 how.flags &= O_PATH_FLAGS; in build_open_how()
1115 if (!WILL_CREATE(how.flags)) in build_open_how()
1122 u64 flags = how->flags; in build_open_flags() local
1125 int acc_mode = ACC_MODE(flags); in build_open_flags()
1135 flags &= ~strip; in build_open_flags()
1142 if (flags & ~VALID_OPEN_FLAGS) in build_open_flags()
1152 if (WILL_CREATE(flags)) { in build_open_flags()
1167 if ((flags & (O_DIRECTORY | O_CREAT)) == (O_DIRECTORY | O_CREAT)) in build_open_flags()
1171 if (flags & __O_TMPFILE) { in build_open_flags()
1177 if (!(flags & O_DIRECTORY)) in build_open_flags()
1182 if (flags & O_PATH) { in build_open_flags()
1184 if (flags & ~O_PATH_FLAGS) in build_open_flags()
1195 if (flags & __O_SYNC) in build_open_flags()
1196 flags |= O_DSYNC; in build_open_flags()
1198 op->open_flag = flags; in build_open_flags()
1201 if (flags & O_TRUNC) in build_open_flags()
1206 if (flags & O_APPEND) in build_open_flags()
1211 op->intent = flags & O_PATH ? 0 : LOOKUP_OPEN; in build_open_flags()
1213 if (flags & O_CREAT) { in build_open_flags()
1215 if (flags & O_EXCL) { in build_open_flags()
1217 flags |= O_NOFOLLOW; in build_open_flags()
1221 if (flags & O_DIRECTORY) in build_open_flags()
1223 if (!(flags & O_NOFOLLOW)) in build_open_flags()
1238 if (flags & (O_TRUNC | O_CREAT | __O_TMPFILE)) in build_open_flags()
1258 struct file *file_open_name(struct filename *name, int flags, umode_t mode) in file_open_name() argument
1261 struct open_how how = build_open_how(flags, mode); in file_open_name()
1279 struct file *filp_open(const char *filename, int flags, umode_t mode) in filp_open() argument
1285 file = file_open_name(name, flags, mode); in filp_open()
1294 struct file *filp_open_block(const char *filename, int flags, umode_t mode) in filp_open_block() argument
1298 file = filp_open(filename, flags, mode); in filp_open_block()
1314 const char *filename, int flags, umode_t mode) in file_open_root() argument
1317 struct open_how how = build_open_how(flags, mode); in file_open_root()
1339 fd = get_unused_fd_flags(how->flags); in do_sys_openat2()
1354 long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode) in do_sys_open() argument
1356 struct open_how how = build_open_how(flags, mode); in do_sys_open()
1361 SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode) in SYSCALL_DEFINE3() argument
1364 flags |= O_LARGEFILE; in SYSCALL_DEFINE3()
1365 return do_sys_open(AT_FDCWD, filename, flags, mode); in SYSCALL_DEFINE3()
1368 SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags, in SYSCALL_DEFINE4() argument
1372 flags |= O_LARGEFILE; in SYSCALL_DEFINE4()
1373 return do_sys_open(dfd, filename, flags, mode); in SYSCALL_DEFINE4()
1395 if (!(tmp.flags & O_PATH) && force_o_largefile()) in SYSCALL_DEFINE4()
1396 tmp.flags |= O_LARGEFILE; in SYSCALL_DEFINE4()
1406 COMPAT_SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode) in COMPAT_SYSCALL_DEFINE3() argument
1408 return do_sys_open(AT_FDCWD, filename, flags, mode); in COMPAT_SYSCALL_DEFINE3()
1415 COMPAT_SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags, umode_t, mode) in COMPAT_SYSCALL_DEFINE4() argument
1417 return do_sys_open(dfd, filename, flags, mode); in COMPAT_SYSCALL_DEFINE4()
1429 int flags = O_CREAT | O_WRONLY | O_TRUNC; in SYSCALL_DEFINE2() local
1432 flags |= O_LARGEFILE; in SYSCALL_DEFINE2()
1433 return do_sys_open(AT_FDCWD, pathname, flags, mode); in SYSCALL_DEFINE2()
1495 unsigned int, flags) in SYSCALL_DEFINE3() argument
1497 return __close_range(fd, max_fd, flags); in SYSCALL_DEFINE3()