diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-04-11 12:01:03 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-04-12 07:04:19 -0400 |
commit | a786c06d9f2719203c00b3d97b21f9a96980d0b5 (patch) | |
tree | 29a5e2ea710084cc115ec496e667658704ab72c2 /mm/shmem.c | |
parent | 19dfc1f5f2ef03a52aa30c8257c5745edef23f55 (diff) |
missing bits of "splice: fix racy pipe->buffers uses"
that commit has fixed only the parts of that mess in fs/splice.c itself;
there had been more in several other ->splice_read() instances...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index 17d3799d04bd..37400a148f29 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1613,7 +1613,7 @@ static ssize_t shmem_file_splice_read(struct file *in, loff_t *ppos, index = *ppos >> PAGE_CACHE_SHIFT; loff = *ppos & ~PAGE_CACHE_MASK; req_pages = (len + loff + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; - nr_pages = min(req_pages, pipe->buffers); + nr_pages = min(req_pages, spd.nr_pages_max); spd.nr_pages = find_get_pages_contig(mapping, index, nr_pages, spd.pages); |