diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-26 17:21:13 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-26 17:21:13 -0800 |
commit | d8e435f3ab6fea2ea324dce72b51dd7761747523 (patch) | |
tree | cb754f8e125e7dcfe40d3a17d035fa31e99d914b /fs/splice.c | |
parent | e348031214d5dce67be93271433b27a93cba5b3f (diff) | |
parent | 8e54cadab447dae779f80f79c87cbeaea9594f60 (diff) | |
download | talos-obmc-linux-d8e435f3ab6fea2ea324dce72b51dd7761747523.tar.gz talos-obmc-linux-d8e435f3ab6fea2ea324dce72b51dd7761747523.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs splice fix from Al Viro.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
fix default_file_splice_read()
Diffstat (limited to 'fs/splice.c')
-rw-r--r-- | fs/splice.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/splice.c b/fs/splice.c index dcaf185a5731..5a7750bd2eea 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -408,7 +408,8 @@ static ssize_t default_file_splice_read(struct file *in, loff_t *ppos, if (res <= 0) return -ENOMEM; - nr_pages = res / PAGE_SIZE; + BUG_ON(dummy); + nr_pages = DIV_ROUND_UP(res, PAGE_SIZE); vec = __vec; if (nr_pages > PIPE_DEF_BUFFERS) { |