···354 unsigned int offset;355 ssize_t ret;356 void *ptr;0357358 /*359 * sub-optimal, but we are limited by the pipe ->map. we don't···367 return PTR_ERR(ptr);368369 offset = pos & ~PAGE_CACHE_MASK;0370371- ret = file->f_op->sendpage(file, buf->page, offset, sd->len, &pos,372- sd->len < sd->total_len);373374 buf->ops->unmap(info, buf);375 if (ret == sd->len)
···354 unsigned int offset;355 ssize_t ret;356 void *ptr;357+ int more;358359 /*360 * sub-optimal, but we are limited by the pipe ->map. we don't···366 return PTR_ERR(ptr);367368 offset = pos & ~PAGE_CACHE_MASK;369+ more = (sd->flags & SPLICE_F_MORE) || sd->len < sd->total_len;370371+ ret = file->f_op->sendpage(file, buf->page, offset, sd->len, &pos,more);0372373 buf->ops->unmap(info, buf);374 if (ret == sd->len)
+1
include/linux/pipe_fs_i.h
···62#define SPLICE_F_NONBLOCK (0x02) /* don't block on the pipe splicing (but */63 /* we may still block on the fd we splice */64 /* from/to, of course */06566#endif
···62#define SPLICE_F_NONBLOCK (0x02) /* don't block on the pipe splicing (but */63 /* we may still block on the fd we splice */64 /* from/to, of course */65+#define SPLICE_F_MORE (0x04) /* expect more data */6667#endif