Lines Matching full:open

36 	struct io_open *open = io_kiocb_to_cmd(req, struct io_open);  in __io_openat_prep()  local
45 /* open.how should be already initialised */ in __io_openat_prep()
46 if (!(open->how.flags & O_PATH) && force_o_largefile()) in __io_openat_prep()
47 open->how.flags |= O_LARGEFILE; in __io_openat_prep()
49 open->dfd = READ_ONCE(sqe->fd); in __io_openat_prep()
51 open->filename = getname(fname); in __io_openat_prep()
52 if (IS_ERR(open->filename)) { in __io_openat_prep()
53 ret = PTR_ERR(open->filename); in __io_openat_prep()
54 open->filename = NULL; in __io_openat_prep()
58 open->file_slot = READ_ONCE(sqe->file_index); in __io_openat_prep()
59 if (open->file_slot && (open->how.flags & O_CLOEXEC)) in __io_openat_prep()
62 open->nofile = rlimit(RLIMIT_NOFILE); in __io_openat_prep()
69 struct io_open *open = io_kiocb_to_cmd(req, struct io_open); in io_openat_prep() local
73 open->how = build_open_how(flags, mode); in io_openat_prep()
79 struct io_open *open = io_kiocb_to_cmd(req, struct io_open); in io_openat2_prep() local
89 ret = copy_struct_from_user(&open->how, sizeof(open->how), how, len); in io_openat2_prep()
98 struct io_open *open = io_kiocb_to_cmd(req, struct io_open); in io_openat2() local
102 bool fixed = !!open->file_slot; in io_openat2()
105 ret = build_open_flags(&open->how, &op); in io_openat2()
109 resolve_nonblock = open->how.resolve & RESOLVE_CACHED; in io_openat2()
112 * Don't bother trying for O_TRUNC, O_CREAT, or O_TMPFILE open, in io_openat2()
115 if (open->how.flags & (O_TRUNC | O_CREAT | O_TMPFILE)) in io_openat2()
122 ret = __get_unused_fd_flags(open->how.flags, open->nofile); in io_openat2()
127 file = do_filp_open(open->dfd, open->filename, &op); in io_openat2()
153 open->file_slot); in io_openat2()
155 putname(open->filename); in io_openat2()
170 struct io_open *open = io_kiocb_to_cmd(req, struct io_open); in io_open_cleanup() local
172 if (open->filename) in io_open_cleanup()
173 putname(open->filename); in io_open_cleanup()