Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
[linux-2.6-block.git] / fs / splice.c
index 3dc142637ab5f525e451d208089c8ca584753039..9947b5c696649a20cf4064883efc89ae26a81b78 100644 (file)
@@ -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;