Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1483100
| From | Miklos Szeredi <mszeredi@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 10/11] splice: don't check i_size in generic_file_splice_read() |
| Date | 2016-09-14 10:40 +0200 |
| Message-ID | <shdTA-6Z2-27@gated-at.bofh.it> (permalink) |
| References | <shdTz-6Z2-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This is handled in get_page_for_read() already.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
---
fs/splice.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/fs/splice.c b/fs/splice.c
index e7757b363b6c..bee282803ccf 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -334,20 +334,11 @@ ssize_t generic_file_splice_read(struct file *in, loff_t *ppos,
struct pipe_inode_info *pipe, size_t len,
unsigned int flags)
{
- loff_t isize, left;
int ret;
if (IS_DAX(in->f_mapping->host))
return default_file_splice_read(in, ppos, pipe, len, flags);
- isize = i_size_read(in->f_mapping->host);
- if (unlikely(*ppos >= isize))
- return 0;
-
- left = isize - *ppos;
- if (unlikely(left < len))
- len = left;
-
ret = __generic_file_splice_read(in, ppos, pipe, len, flags);
if (ret > 0) {
*ppos += ret;
--
2.5.5
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/11] splice cleanups Miklos Szeredi <mszeredi@redhat.com> - 2016-09-14 10:40 +0200
[PATCH 09/11] splice: use get_page_for_read() Miklos Szeredi <mszeredi@redhat.com> - 2016-09-14 10:40 +0200
[PATCH 10/11] splice: don't check i_size in generic_file_splice_read() Miklos Szeredi <mszeredi@redhat.com> - 2016-09-14 10:40 +0200
[PATCH 11/11] splice: fold __generic_file_splice_read() into caller Miklos Szeredi <mszeredi@redhat.com> - 2016-09-14 10:40 +0200
[PATCH 07/11] pipe: remove generic_pipe_buf_confirm() Miklos Szeredi <mszeredi@redhat.com> - 2016-09-14 10:40 +0200
Re: [PATCH 07/11] pipe: remove generic_pipe_buf_confirm() Christoph Hellwig <hch@infradead.org> - 2016-09-16 13:30 +0200
[PATCH 01/11] pipe: add pipe_buf_get() helper Miklos Szeredi <mszeredi@redhat.com> - 2016-09-14 10:50 +0200
[PATCH 02/11] pipe: add pipe_buf_release() helper Miklos Szeredi <mszeredi@redhat.com> - 2016-09-14 10:50 +0200
[PATCH 04/11] pipe: add pipe_buf_steal() helper Miklos Szeredi <mszeredi@redhat.com> - 2016-09-14 10:50 +0200
Re: [PATCH 00/11] splice cleanups Cedric Blancher <cedric.blancher@gmail.com> - 2016-09-14 11:00 +0200
Re: [PATCH 00/11] splice cleanups Miklos Szeredi <mszeredi@redhat.com> - 2016-09-14 11:40 +0200
Re: [PATCH 00/11] splice cleanups Christoph Hellwig <hch@infradead.org> - 2016-09-16 13:30 +0200
csiph-web