|
@@ -30,6 +30,7 @@
|
|
|
#include <linux/uio.h>
|
|
|
#include <linux/security.h>
|
|
|
#include <linux/gfp.h>
|
|
|
+#include <linux/socket.h>
|
|
|
|
|
|
/*
|
|
|
* Attempt to steal a page from a pipe buffer. This should perhaps go into
|
|
@@ -690,7 +691,9 @@ static int pipe_to_sendpage(struct pipe_inode_info *pipe,
|
|
|
if (!likely(file->f_op && file->f_op->sendpage))
|
|
|
return -EINVAL;
|
|
|
|
|
|
- more = (sd->flags & SPLICE_F_MORE) || sd->len < sd->total_len;
|
|
|
+ more = (sd->flags & SPLICE_F_MORE) ? MSG_MORE : 0;
|
|
|
+ if (sd->len < sd->total_len)
|
|
|
+ more |= MSG_SENDPAGE_NOTLAST;
|
|
|
return file->f_op->sendpage(file, buf->page, buf->offset,
|
|
|
sd->len, &pos, more);
|
|
|
}
|