mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ncpfs: use vma_pages() to replace (vm_end - vm_start) >> PAGE_SHIFT
(*->vm_end - *->vm_start) >> PAGE_SHIFT operation is implemented as a inline funcion vma_pages() in linux/mm.h, so using it. Signed-off-by: Libin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
d6e9321770
commit
ef9f515a4c
1 changed files with 1 additions and 1 deletions
|
|
@ -117,7 +117,7 @@ int ncp_mmap(struct file *file, struct vm_area_struct *vma)
|
|||
return -EINVAL;
|
||||
/* we do not support files bigger than 4GB... We eventually
|
||||
supports just 4GB... */
|
||||
if (((vma->vm_end - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff
|
||||
if (vma_pages(vma) + vma->vm_pgoff
|
||||
> (1U << (32 - PAGE_SHIFT)))
|
||||
return -EFBIG;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue