X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fsplice.c;h=f8476841eb04e08edc2ad069e97cddc3da242e7f;hb=7ea6411f4ceb62e5e53170d59d10996dca20c599;hp=5f883de7ef3ad0bd8dfe9392356725660f9a69b3;hpb=7bf97e1d5a94b6a71815771bb9452fc2c022c966;p=karo-tx-linux.git diff --git a/fs/splice.c b/fs/splice.c index 5f883de7ef3a..f8476841eb04 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -30,6 +30,7 @@ #include #include #include +#include /* * 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); }