open_flags
blk_mode_t open_flags = BLK_OPEN_READ;
open_flags |= BLK_OPEN_WRITE;
bdev_file = bdev_file_open_by_path(full_path, open_flags, NULL, NULL);
__u32 open_flags;
unsigned int open_flags,
exp_info.flags = open_flags;
return dma_buf_fd(dmabuf, open_flags);
return iommufd_test_dmabuf_get(ucmd, cmd->dmabuf_get.open_flags,
exp_info.flags = get_dma_buf.open_flags;
ret = dma_buf_fd(priv->dmabuf, get_dma_buf.open_flags);
int open_flags = O_CREAT | O_WRONLY | O_NOFOLLOW | O_LARGEFILE | O_EXCL;
file = file_open_root(&root, cn->corename, open_flags, 0600);
file = filp_open(cn->corename, open_flags, 0600);
struct open_flags open_exec_flags = {
if (ff->open_flags & (FOPEN_STREAM | FOPEN_NONSEEKABLE))
if (!(ff->open_flags & FOPEN_KEEP_CACHE))
inarg.open_flags |= FUSE_OPEN_KILL_SUIDGID;
ff->open_flags = outopenp->open_flags;
else if (!(ff->open_flags & FOPEN_KEEP_CACHE))
unsigned int open_flags, bool isdir)
if (!(ff->open_flags & FOPEN_PARALLEL_DIRECT_WRITES))
ff->open_flags = FOPEN_KEEP_CACHE | (isdir ? FOPEN_CACHE_DIR : 0);
err = fuse_send_open(fm, nodeid, open_flags, opcode, outargp);
ff->open_flags = outargp->open_flags;
bool fopen_direct_io = ff->open_flags & FOPEN_DIRECT_IO;
ff->open_flags &= ~FOPEN_DIRECT_IO;
if (ff->open_flags & FOPEN_DIRECT_IO)
if (ff->open_flags & FOPEN_DIRECT_IO)
if (fuse_file_passthrough(ff) && !(ff->open_flags & FOPEN_DIRECT_IO))
if (fuse_file_passthrough(ff) && !(ff->open_flags & FOPEN_DIRECT_IO))
if (ff->open_flags & FOPEN_STREAM)
else if (ff->open_flags & FOPEN_NONSEEKABLE)
if (ff->open_flags & FOPEN_DIRECT_IO) {
unsigned int open_flags, int opcode,
else if (!(ff->open_flags & FOPEN_KEEP_CACHE))
inarg.flags = open_flags & ~(O_CREAT | O_EXCL | O_NOCTTY);
unsigned int open_flags, fl_owner_t id, bool isdir)
fuse_prepare_release(fi, ff, open_flags, opcode, false);
inarg.open_flags |= FUSE_OPEN_KILL_SUIDGID;
if (ff->open_flags & FOPEN_NOFLUSH && !fm->fc->writeback_cache)
unsigned int open_flags, bool isdir);
unsigned int open_flags, fl_owner_t id, bool isdir);
u32 open_flags;
(ff->open_flags & ~FOPEN_PASSTHROUGH_MASK))
if (fuse_inode_backing(fi) && !(ff->open_flags & FOPEN_PASSTHROUGH))
if (!(ff->open_flags & FOPEN_DIRECT_IO))
ff->open_flags &= ~FOPEN_PARALLEL_DIRECT_WRITES;
if ((ff->open_flags & FOPEN_DIRECT_IO) &&
!(ff->open_flags & FOPEN_PASSTHROUGH))
if (ff->open_flags & FOPEN_PASSTHROUGH)
ff->open_flags, err);
if (ff->open_flags & FOPEN_CACHE_DIR)
if (ff->open_flags & FOPEN_CACHE_DIR)
if (ff->open_flags & FOPEN_CACHE_DIR)
const struct open_flags *op);
const char *, const struct open_flags *);
extern int build_open_flags(const struct open_how *how, struct open_flags *op);
const struct open_flags *op,
struct file *file, const struct open_flags *op)
struct file *file, const struct open_flags *op)
const struct open_flags *op,
const struct open_flags *op, unsigned flags)
const struct open_flags *op)
const char *name, const struct open_flags *op)
static struct nfs_open_context *create_nfs_open_context(struct dentry *dentry, int open_flags, struct file *filp)
return alloc_nfs_open_context(dentry, flags_to_mode(open_flags), filp);
struct file *file, unsigned open_flags)
struct file *file, unsigned open_flags,
err = nfs_check_flags(open_flags);
if ((open_flags & O_DIRECTORY)) {
if (open_flags & O_CREAT) {
if (open_flags & O_TRUNC) {
if (!(open_flags & O_CREAT) && !d_in_lookup(dentry)) {
ctx = create_nfs_open_context(dentry, open_flags, file);
trace_nfs_atomic_open_enter(dir, ctx, open_flags);
inode = NFS_PROTO(dir)->open_context(dir, ctx, open_flags, &attr, &created);
trace_nfs_atomic_open_exit(dir, ctx, open_flags, err);
if (!(open_flags & O_NOFOLLOW))
err = nfs_finish_open(ctx, ctx->dentry, file, open_flags);
trace_nfs_atomic_open_exit(dir, ctx, open_flags, err);
struct file *file, unsigned int open_flags,
if (open_flags & O_CREAT) {
error = nfs_do_create(dir, dentry, mode, open_flags);
} else if (error != -EEXIST || open_flags & O_EXCL)
umode_t mode, int open_flags)
open_flags |= O_CREAT;
if (open_flags & O_TRUNC) {
trace_nfs_create_enter(dir, dentry, open_flags);
error = NFS_PROTO(dir)->create(dir, dentry, &attr, open_flags);
trace_nfs_create_exit(dir, dentry, open_flags, error);
umode_t mode, int open_flags);
p->o_arg.open_flags = flags;
int open_mode = opendata->o_arg.open_flags;
int openflags = opendata->o_arg.open_flags;
data->o_arg.open_flags, claim))
if (data->o_arg.open_flags & O_EXCL) {
!(o_arg->open_flags & O_CREAT))
if (o_arg->open_flags & O_CREAT) {
if (o_arg->open_flags & O_EXCL)
opendata->o_arg.open_flags = O_DIRECT;
if ((opendata->o_arg.open_flags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL) &&
int open_flags, struct iattr *attr, int *opened)
state = nfs4_do_open(dir, ctx, open_flags, attr, label, opened);
switch (arg->open_flags & O_CREAT) {
static int dlmfs_decode_open_flags(int open_flags,
if (open_flags & (O_WRONLY|O_RDWR))
if (open_flags & O_NONBLOCK)
inline int build_open_flags(const struct open_how *how, struct open_flags *op)
struct open_flags op;
struct open_flags op;
struct open_flags op;
unsigned int find_flags, unsigned int open_flags,
unsigned int open_flags);
unsigned int open_flags)
!open_flags_match(cifs_inode, open_flags,
unsigned int find_flags, unsigned int open_flags,
!open_flags_match(cifs_inode, open_flags,
struct path *path, char *name, int open_flags,
if (!(open_flags & O_CREAT))
int req_op_level = 0, open_flags = 0, may_flags = 0, file_info = 0;
open_flags = smb2_create_open_flags(file_present, daccess,
if (open_flags & (O_CREAT | O_TRUNC)) {
rc = smb2_creat(work, &path, name, open_flags,
filp = dentry_open(&path, open_flags, current_cred());
if (!(open_flags & O_TRUNC))
} else if (open_flags & O_CREAT) {
if (!S_ISDIR(file_inode(filp)->i_mode) && open_flags & O_TRUNC &&
} else if (open_flags == O_RDONLY &&
struct file *file, unsigned int open_flags,
int open_flags,
int open_flags;
__u32 open_flags;
uint32_t open_flags; /* FUSE_OPEN_... */
uint32_t open_flags; /* FUSE_OPEN_... */
uint32_t open_flags;
__u32 open_flags;
__u32 open_flags;
BUILD_BUG_SQE_ELEM(28, __u32, open_flags);
struct open_flags op;
u64 flags = READ_ONCE(sqe->open_flags);
const int open_flags = O_WRONLY|O_APPEND|O_LARGEFILE;
original_file = file_open_name(pathname, open_flags, 0);
file = dentry_open(&internal, open_flags, current_cred());
#define BPF_MAP_GET_FD_BY_ID_LAST_FIELD open_flags
attr->open_flags & ~BPF_OBJ_FLAG_MASK)
f_flags = bpf_get_file_flag(attr->open_flags);
if (attr->open_flags & ~BPF_F_TOKEN_FD)
if (attr->open_flags & BPF_F_TOKEN_FD) {
opts_ro.open_flags = BPF_F_RDONLY;
int map_parse_fds(int *argc, char ***argv, int **fds, __u32 open_flags)
assert((open_flags & ~BPF_F_RDONLY) == 0);
opts.open_flags = open_flags;
get_opts.file_flags = open_flags;
int map_parse_fd(int *argc, char ***argv, __u32 open_flags)
nb_fds = map_parse_fds(argc, argv, &fds, open_flags);
__u32 *info_len, __u32 open_flags)
fd = map_parse_fd(argc, argv, open_flags);
opts_ro.open_flags = BPF_F_RDONLY;
int map_parse_fd(int *argc, char ***argv, __u32 open_flags);
int map_parse_fds(int *argc, char ***argv, int **fds, __u32 open_flags);
__u32 *info_len, __u32 open_flags);
__u32 *flags, __u32 **value_fd, __u32 open_flags)
flags, value_fd, open_flags);
fd = map_parse_fd(&argc, &argv, open_flags);
flags, NULL, open_flags);
value_size, NULL, value_fd, open_flags);
opts.open_flags = BPF_F_RDONLY;
__u32 open_flags;
__u32 open_flags;
const size_t attr_sz = offsetofend(union bpf_attr, open_flags);
const size_t attr_sz = offsetofend(union bpf_attr, open_flags);
attr.open_flags = OPTS_GET(opts, open_flags, 0);
const size_t attr_sz = offsetofend(union bpf_attr, open_flags);
attr.open_flags = OPTS_GET(opts, open_flags, 0);
attr.open_flags = OPTS_GET(opts, open_flags, 0);
const size_t attr_sz = offsetofend(union bpf_attr, open_flags);
attr.open_flags = OPTS_GET(opts, open_flags, 0);
__u32 open_flags; /* permissions requested for the operation on fd */
opts.open_flags |= BPF_F_TOKEN_FD;
evsel->open_flags = PERF_FLAG_FD_CLOEXEC;
evsel->open_flags |= PERF_FLAG_PID_CGROUP;
evsel->open_flags &= ~(unsigned long)PERF_FLAG_FD_CLOEXEC;
if ((evsel->open_flags & PERF_FLAG_FD_CLOEXEC) &&
pid, cpu.cpu, group_fd, evsel->open_flags);
group_fd, evsel->open_flags);
fd, group_fd, evsel->open_flags);
unsigned long open_flags;
.open_flags = BPF_F_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_WRONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_WRONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_WRONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
fd = open(sysctl_path, test->open_flags | O_CLOEXEC);
if (test->open_flags == O_RDONLY) {
} else if (test->open_flags == O_WRONLY) {
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
int open_flags;
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_WRONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_WRONLY,
.open_flags = O_WRONLY,
.open_flags = O_WRONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
.open_flags = O_WRONLY,
.open_flags = O_RDONLY,
.open_flags = O_RDONLY,
int open_flags, mode_t open_mode)
int fd = open(filename, open_flags, open_mode);
.dmabuf_get = { .length = len, .open_flags = O_CLOEXEC },
const int open_flags)
return open(procfd_path, open_flags);