Lines Matching refs:flags
78 buf->flags |= PIPE_BUF_FLAG_LRU; in page_cache_pipe_buf_steal()
96 buf->flags &= ~PIPE_BUF_FLAG_LRU; in page_cache_pipe_buf_release()
151 if (!(buf->flags & PIPE_BUF_FLAG_GIFT)) in user_page_pipe_buf_steal()
154 buf->flags |= PIPE_BUF_FLAG_LRU; in user_page_pipe_buf_steal()
208 buf->flags = 0; in splice_to_pipe()
297 unsigned int flags) in generic_file_splice_read() argument
367 unsigned int flags) in default_file_splice_read() argument
444 more = (sd->flags & SPLICE_F_MORE) ? MSG_MORE : 0; in pipe_to_sendpage()
553 if (sd->flags & SPLICE_F_NONBLOCK) in splice_from_pipe_next()
647 loff_t *ppos, size_t len, unsigned int flags, in splice_from_pipe() argument
653 .flags = flags, in splice_from_pipe()
681 loff_t *ppos, size_t len, unsigned int flags) in iter_file_splice_write() argument
685 .flags = flags, in iter_file_splice_write()
802 size_t len, unsigned int flags) in default_file_splice_write() argument
806 ret = splice_from_pipe(pipe, out, ppos, len, flags, write_pipe_buf); in default_file_splice_write()
827 loff_t *ppos, size_t len, unsigned int flags) in generic_splice_sendpage() argument
829 return splice_from_pipe(pipe, out, ppos, len, flags, pipe_to_sendpage); in generic_splice_sendpage()
838 loff_t *ppos, size_t len, unsigned int flags) in do_splice_from() argument
848 return splice_write(pipe, out, ppos, len, flags); in do_splice_from()
856 unsigned int flags) in do_splice_to() argument
877 return splice_read(in, ppos, pipe, len, flags); in do_splice_to()
900 int i, flags, more; in splice_direct_to_actor() local
937 flags = sd->flags; in splice_direct_to_actor()
942 sd->flags &= ~SPLICE_F_NONBLOCK; in splice_direct_to_actor()
943 more = sd->flags & SPLICE_F_MORE; in splice_direct_to_actor()
955 ret = do_splice_to(in, &pos, pipe, read_len, flags); in splice_direct_to_actor()
968 sd->flags |= SPLICE_F_MORE; in splice_direct_to_actor()
970 sd->flags &= ~SPLICE_F_MORE; in splice_direct_to_actor()
1022 sd->flags); in direct_splice_actor()
1042 loff_t *opos, size_t len, unsigned int flags) in do_splice_direct() argument
1047 .flags = flags, in do_splice_direct()
1072 static int wait_for_space(struct pipe_inode_info *pipe, unsigned flags) in wait_for_space() argument
1081 if (flags & SPLICE_F_NONBLOCK) in wait_for_space()
1093 size_t len, unsigned int flags);
1100 size_t len, unsigned int flags) in do_splice() argument
1125 flags |= SPLICE_F_NONBLOCK; in do_splice()
1127 return splice_pipe_to_pipe(ipipe, opipe, len, flags); in do_splice()
1153 flags |= SPLICE_F_NONBLOCK; in do_splice()
1156 ret = do_splice_from(ipipe, out, &offset, len, flags); in do_splice()
1180 flags |= SPLICE_F_NONBLOCK; in do_splice()
1183 ret = wait_for_space(opipe, flags); in do_splice()
1191 ret = do_splice_to(in, &offset, opipe, len, flags); in do_splice()
1209 unsigned flags) in iter_to_pipe() argument
1213 .flags = flags in iter_to_pipe()
1265 unsigned int flags) in vmsplice_to_user() argument
1270 .flags = flags, in vmsplice_to_user()
1293 unsigned int flags) in vmsplice_to_pipe() argument
1299 if (flags & SPLICE_F_GIFT) in vmsplice_to_pipe()
1307 ret = wait_for_space(pipe, flags); in vmsplice_to_pipe()
1347 static long do_vmsplice(struct file *f, struct iov_iter *iter, unsigned int flags) in do_vmsplice() argument
1349 if (unlikely(flags & ~SPLICE_F_ALL)) in do_vmsplice()
1356 return vmsplice_to_pipe(f, iter, flags); in do_vmsplice()
1358 return vmsplice_to_user(f, iter, flags); in do_vmsplice()
1362 unsigned long, nr_segs, unsigned int, flags) in SYSCALL_DEFINE4() argument
1379 error = do_vmsplice(f.file, &iter, flags); in SYSCALL_DEFINE4()
1388 unsigned int, nr_segs, unsigned int, flags) in COMPAT_SYSCALL_DEFINE4() argument
1405 error = do_vmsplice(f.file, &iter, flags); in COMPAT_SYSCALL_DEFINE4()
1415 size_t, len, unsigned int, flags) in SYSCALL_DEFINE6() argument
1423 if (unlikely(flags & ~SPLICE_F_ALL)) in SYSCALL_DEFINE6()
1435 len, flags); in SYSCALL_DEFINE6()
1448 static int ipipe_prep(struct pipe_inode_info *pipe, unsigned int flags) in ipipe_prep() argument
1470 if (flags & SPLICE_F_NONBLOCK) { in ipipe_prep()
1486 static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags) in opipe_prep() argument
1506 if (flags & SPLICE_F_NONBLOCK) { in opipe_prep()
1528 size_t len, unsigned int flags) in splice_pipe_to_pipe() argument
1536 ret = ipipe_prep(ipipe, flags); in splice_pipe_to_pipe()
1540 ret = opipe_prep(opipe, flags); in splice_pipe_to_pipe()
1571 if (flags & SPLICE_F_NONBLOCK) { in splice_pipe_to_pipe()
1616 obuf->flags &= ~PIPE_BUF_FLAG_GIFT; in splice_pipe_to_pipe()
1649 size_t len, unsigned int flags) in link_pipe() argument
1696 obuf->flags &= ~PIPE_BUF_FLAG_GIFT; in link_pipe()
1713 if (!ret && ipipe->waiting_writers && (flags & SPLICE_F_NONBLOCK)) in link_pipe()
1735 unsigned int flags) in do_tee() argument
1747 flags |= SPLICE_F_NONBLOCK; in do_tee()
1753 ret = ipipe_prep(ipipe, flags); in do_tee()
1755 ret = opipe_prep(opipe, flags); in do_tee()
1757 ret = link_pipe(ipipe, opipe, len, flags); in do_tee()
1764 SYSCALL_DEFINE4(tee, int, fdin, int, fdout, size_t, len, unsigned int, flags) in SYSCALL_DEFINE4() argument
1769 if (unlikely(flags & ~SPLICE_F_ALL)) in SYSCALL_DEFINE4()
1783 len, flags); in SYSCALL_DEFINE4()