unsigned int offset;
ssize_t ret;
void *ptr;
+ int more;
/*
* sub-optimal, but we are limited by the pipe ->map. we don't
return PTR_ERR(ptr);
offset = pos & ~PAGE_CACHE_MASK;
+ more = (sd->flags & SPLICE_F_MORE) || sd->len < sd->total_len;
- ret = file->f_op->sendpage(file, buf->page, offset, sd->len, &pos,
- sd->len < sd->total_len);
+ ret = file->f_op->sendpage(file, buf->page, offset, sd->len, &pos,more);
buf->ops->unmap(info, buf);
if (ret == sd->len)
#define SPLICE_F_NONBLOCK (0x02) /* don't block on the pipe splicing (but */
/* we may still block on the fd we splice */
/* from/to, of course */
+#define SPLICE_F_MORE (0x04) /* expect more data */
#endif