Commit d8e435f3 authored by Linus Torvalds's avatar Linus Torvalds

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()
parents e3480312 8e54cada
...@@ -408,7 +408,8 @@ static ssize_t default_file_splice_read(struct file *in, loff_t *ppos, ...@@ -408,7 +408,8 @@ static ssize_t default_file_splice_read(struct file *in, loff_t *ppos,
if (res <= 0) if (res <= 0)
return -ENOMEM; return -ENOMEM;
nr_pages = res / PAGE_SIZE; BUG_ON(dummy);
nr_pages = DIV_ROUND_UP(res, PAGE_SIZE);
vec = __vec; vec = __vec;
if (nr_pages > PIPE_DEF_BUFFERS) { if (nr_pages > PIPE_DEF_BUFFERS) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment