diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/vfs.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/file.c | 2 | ||||
-rw-r--r-- | fs/read_write.c | 2 | ||||
-rw-r--r-- | fs/splice.c | 26 |
4 files changed, 8 insertions, 24 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 15471a9efe0e..8176fbf5c006 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/file.h> | 23 | #include <linux/file.h> |
24 | #include <linux/mount.h> | 24 | #include <linux/mount.h> |
25 | #include <linux/major.h> | 25 | #include <linux/major.h> |
26 | #include <linux/pipe_fs_i.h> | 26 | #include <linux/splice.h> |
27 | #include <linux/proc_fs.h> | 27 | #include <linux/proc_fs.h> |
28 | #include <linux/stat.h> | 28 | #include <linux/stat.h> |
29 | #include <linux/fcntl.h> | 29 | #include <linux/fcntl.h> |
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index ed1ffa70cc38..44c2e2afa465 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/pagemap.h> | 31 | #include <linux/pagemap.h> |
32 | #include <linux/uio.h> | 32 | #include <linux/uio.h> |
33 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
34 | #include <linux/pipe_fs_i.h> | 34 | #include <linux/splice.h> |
35 | #include <linux/mount.h> | 35 | #include <linux/mount.h> |
36 | #include <linux/writeback.h> | 36 | #include <linux/writeback.h> |
37 | 37 | ||
diff --git a/fs/read_write.c b/fs/read_write.c index 47da8a4a0fbe..2527cf035b0e 100644 --- a/fs/read_write.c +++ b/fs/read_write.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/syscalls.h> | 16 | #include <linux/syscalls.h> |
17 | #include <linux/pagemap.h> | 17 | #include <linux/pagemap.h> |
18 | #include <linux/pipe_fs_i.h> | 18 | #include <linux/splice.h> |
19 | #include "read_write.h" | 19 | #include "read_write.h" |
20 | 20 | ||
21 | #include <asm/uaccess.h> | 21 | #include <asm/uaccess.h> |
diff --git a/fs/splice.c b/fs/splice.c index 13846f723d72..bea9f1581ca0 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
21 | #include <linux/file.h> | 21 | #include <linux/file.h> |
22 | #include <linux/pagemap.h> | 22 | #include <linux/pagemap.h> |
23 | #include <linux/pipe_fs_i.h> | 23 | #include <linux/splice.h> |
24 | #include <linux/mm_inline.h> | 24 | #include <linux/mm_inline.h> |
25 | #include <linux/swap.h> | 25 | #include <linux/swap.h> |
26 | #include <linux/writeback.h> | 26 | #include <linux/writeback.h> |
@@ -29,22 +29,6 @@ | |||
29 | #include <linux/syscalls.h> | 29 | #include <linux/syscalls.h> |
30 | #include <linux/uio.h> | 30 | #include <linux/uio.h> |
31 | 31 | ||
32 | struct partial_page { | ||
33 | unsigned int offset; | ||
34 | unsigned int len; | ||
35 | }; | ||
36 | |||
37 | /* | ||
38 | * Passed to splice_to_pipe | ||
39 | */ | ||
40 | struct splice_pipe_desc { | ||
41 | struct page **pages; /* page map */ | ||
42 | struct partial_page *partial; /* pages[] may not be contig */ | ||
43 | int nr_pages; /* number of pages in map */ | ||
44 | unsigned int flags; /* splice flags */ | ||
45 | const struct pipe_buf_operations *ops;/* ops associated with output pipe */ | ||
46 | }; | ||
47 | |||
48 | /* | 32 | /* |
49 | * Attempt to steal a page from a pipe buffer. This should perhaps go into | 33 | * Attempt to steal a page from a pipe buffer. This should perhaps go into |
50 | * a vm helper function, it's already simplified quite a bit by the | 34 | * a vm helper function, it's already simplified quite a bit by the |
@@ -170,11 +154,11 @@ static const struct pipe_buf_operations user_page_pipe_buf_ops = { | |||
170 | }; | 154 | }; |
171 | 155 | ||
172 | /* | 156 | /* |
173 | * Pipe output worker. This sets up our pipe format with the page cache | 157 | * Pipe output worker. This fills a pipe with the information contained |
174 | * pipe buffer operations. Otherwise very similar to the regular pipe_writev(). | 158 | * from splice_pipe_desc(). |
175 | */ | 159 | */ |
176 | static ssize_t splice_to_pipe(struct pipe_inode_info *pipe, | 160 | ssize_t splice_to_pipe(struct pipe_inode_info *pipe, |
177 | struct splice_pipe_desc *spd) | 161 | struct splice_pipe_desc *spd) |
178 | { | 162 | { |
179 | unsigned int spd_pages = spd->nr_pages; | 163 | unsigned int spd_pages = spd->nr_pages; |
180 | int ret, do_wakeup, page_nr; | 164 | int ret, do_wakeup, page_nr; |