mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]>
This commit is contained in:
parent
19dfc1f5f2
commit
a786c06d9f
3 changed files with 4 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue