mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
mm: use vma_pages() for vma objects
vma_pages() is more readable and also better at avoiding error codes, so use vma_pages() instead of direct operations on vma Link: https://lkml.kernel.org/r/tencent_151850CF327EB055BBC83298A929BD06CD0A@qq.com Signed-off-by: Chen Haonan <chen.haonan2@zte.com.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
4196810a25
commit
dd05f5ec1e
@ -616,7 +616,7 @@ folio_within_range(struct folio *folio, struct vm_area_struct *vma,
|
||||
unsigned long start, unsigned long end)
|
||||
{
|
||||
pgoff_t pgoff, addr;
|
||||
unsigned long vma_pglen = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
|
||||
unsigned long vma_pglen = vma_pages(vma);
|
||||
|
||||
VM_WARN_ON_FOLIO(folio_test_ksm(folio), folio);
|
||||
if (start > end)
|
||||
|
Loading…
Reference in New Issue
Block a user