summaryrefslogtreecommitdiffstats
path: root/kernel/fs/splice.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fs/splice.c')
-rw-r--r--kernel/fs/splice.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/fs/splice.c b/kernel/fs/splice.c
index 4cf700d50..0f77e9682 100644
--- a/kernel/fs/splice.c
+++ b/kernel/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;
+ if (!spd_pages)
+ return 0;
+
ret = 0;
do_wakeup = 0;
page_nr = 0;