Lines Matching defs:in

6  * an arbitrary in-memory buffer. Think of a pipe as a small kernel
90 * If we succeeded in removing the mapping, set LRU flag
117 * is a page cache page, IO may be in flight.
303 * @in: The file to read from
321 ssize_t copy_splice_read(struct file *in, loff_t *ppos,
363 init_sync_kiocb(&kiocb, in);
365 ret = call_read_iter(in, &kiocb, &to);
373 * Callers of ->splice_read() expect -EAGAIN on "can't put anything in
434 * destination. It returns when there's no more buffers left in
623 * @ppos: position in @out
656 * @ppos: position in @out
790 * @ppos: position in @out
959 static ssize_t do_splice_read(struct file *in, loff_t *ppos,
965 if (unlikely(!(in->f_mode & FMODE_READ)))
977 if (unlikely(!in->f_op->splice_read))
978 return warn_unsupported(in, "read");
983 if ((in->f_flags & O_DIRECT) || IS_DAX(in->f_mapping->host))
984 return copy_splice_read(in, ppos, pipe, len, flags);
985 return in->f_op->splice_read(in, ppos, pipe, len, flags);
990 * @in: File to splice from
1003 ssize_t vfs_splice_read(struct file *in, loff_t *ppos,
1009 ret = rw_verify_area(READ, in, ppos, len);
1013 return do_splice_read(in, ppos, pipe, len, flags);
1019 * @in: file to splice from
1026 * pipe is cached in the process, and reused during the lifetime of
1030 ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
1043 if (unlikely(!(in->f_mode & FMODE_LSEEK)))
1047 * neither in nor out is a pipe, setup an internal pipe attached to
1048 * 'out' and transfer the wanted data from 'in' to 'out' through that
1089 ret = do_splice_read(in, &pos, pipe, len, flags);
1105 * must not do the output in nonblocking mode as then we
1106 * could get stuck data in the internal pipe:
1126 file_accessed(in);
1141 * the pipe buffers in question:
1185 static ssize_t do_splice_direct_actor(struct file *in, loff_t *ppos,
1207 ret = splice_direct_to_actor(in, &sd, actor);
1215 * @in: file to splice from
1224 * doing it in the application would incur an extra system call
1225 * (splice in + splice out, as compared to just sendfile()). So this helper
1230 ssize_t do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
1233 return do_splice_direct_actor(in, ppos, out, opos, len, flags,
1240 * @in: file to splice from
1253 ssize_t splice_file_range(struct file *in, loff_t *ppos, struct file *out,
1258 return do_splice_direct_actor(in, ppos, out, opos,
1285 ssize_t splice_file_to_pipe(struct file *in,
1295 ret = do_splice_read(in, offset, opipe, len, flags);
1305 ssize_t do_splice(struct file *in, loff_t *off_in, struct file *out,
1313 if (unlikely(!(in->f_mode & FMODE_READ) ||
1317 ipipe = get_pipe_info(in, true);
1328 if ((in->f_flags | out->f_flags) & O_NONBLOCK)
1350 if (in->f_flags & O_NONBLOCK)
1365 if (!(in->f_mode & FMODE_PREAD))
1369 offset = in->f_pos;
1372 ret = rw_verify_area(READ, in, &offset, len);
1379 ret = splice_file_to_pipe(in, opipe, &offset, len, flags);
1382 in->f_pos = offset;
1391 * Generate modify out before access in:
1396 fsnotify_access(in);
1402 static ssize_t __do_splice(struct file *in, loff_t __user *off_in,
1411 ipipe = get_pipe_info(in, true);
1417 pipe_clear_nowait(in);
1436 ret = do_splice(in, __off_in, out, __off_out, len, flags);
1586 * or nasty vm tricks. We simply map in the user memory and fill them into
1638 struct fd in, out;
1648 in = fdget(fd_in);
1649 if (in.file) {
1652 error = __do_splice(in.file, off_in, out.file, off_out,
1656 fdput(in);
1862 * If we put data in the output pipe, wakeup any potential readers.
1953 * If we put data in the output pipe, wakeup any potential readers.
1963 * any data, it simply references the 'in' pages on the 'out' pipe.
1967 ssize_t do_tee(struct file *in, struct file *out, size_t len,
1970 struct pipe_inode_info *ipipe = get_pipe_info(in, true);
1974 if (unlikely(!(in->f_mode & FMODE_READ) ||
1983 if ((in->f_flags | out->f_flags) & O_NONBLOCK)
1999 fsnotify_access(in);
2008 struct fd in, out;
2018 in = fdget(fdin);
2019 if (in.file) {
2022 error = do_tee(in.file, out.file, len, flags);
2025 fdput(in);