projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branches 'work.lookups', 'work.misc' and 'work.preadv2' into for-next
[cascardo/linux.git]
/
fs
/
splice.c
diff --git
a/fs/splice.c
b/fs/splice.c
index
82bc0d6
..
9947b5c
100644
(file)
--- a/
fs/splice.c
+++ b/
fs/splice.c
@@
-185,6
+185,9
@@
ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
unsigned int spd_pages = spd->nr_pages;
int ret, do_wakeup, page_nr;
unsigned int spd_pages = spd->nr_pages;
int ret, do_wakeup, page_nr;
+ if (!spd_pages)
+ return 0;
+
ret = 0;
do_wakeup = 0;
page_nr = 0;
ret = 0;
do_wakeup = 0;
page_nr = 0;
@@
-577,7
+580,7
@@
static ssize_t kernel_readv(struct file *file, const struct iovec *vec,
old_fs = get_fs();
set_fs(get_ds());
/* The cast to a user pointer is valid due to the set_fs() */
old_fs = get_fs();
set_fs(get_ds());
/* The cast to a user pointer is valid due to the set_fs() */
- res = vfs_readv(file, (const struct iovec __user *)vec, vlen, &pos);
+ res = vfs_readv(file, (const struct iovec __user *)vec, vlen, &pos
, 0
);
set_fs(old_fs);
return res;
set_fs(old_fs);
return res;