projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nfsd: fix error values returned by nfsd4_lockt() when nfsd_open() fails
[firefly-linux-kernel-4.4.55.git]
/
fs
/
splice.c
diff --git
a/fs/splice.c
b/fs/splice.c
index aa866d309695497c1c8925cb30c8af6884f20aaf..9d890085f9ba116b991b43780ba1ba28f9b61337 100644
(file)
--- a/
fs/splice.c
+++ b/
fs/splice.c
@@
-31,6
+31,7
@@
#include <linux/uio.h>
#include <linux/security.h>
#include <linux/gfp.h>
#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
/*
* Attempt to steal a page from a pipe buffer. This should perhaps go into
@@
-691,7
+692,9
@@
static int pipe_to_sendpage(struct pipe_inode_info *pipe,
if (!likely(file->f_op && file->f_op->sendpage))
return -EINVAL;
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);
}
return file->f_op->sendpage(file, buf->page, buf->offset,
sd->len, &pos, more);
}