[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1582520593-30704-5-git-send-email-anshuman.khandual@arm.com>
Date: Mon, 24 Feb 2020 10:33:13 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc: Anshuman Khandual <anshuman.khandual@....com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH V2 4/4] mm/vma: Replace all remaining open encodings with vma_is_anonymous()
This replaces all remaining open encodings with vma_is_anonymous().
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-mm@...ck.org
Cc: linux-kernel@...r.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@....com>
---
mm/gup.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/gup.c b/mm/gup.c
index c8ffe2e61f03..58c8cbfeded6 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -146,7 +146,8 @@ static struct page *no_page_table(struct vm_area_struct *vma,
* But we can only make this optimization where a hole would surely
* be zero-filled if handle_mm_fault() actually did handle it.
*/
- if ((flags & FOLL_DUMP) && (!vma->vm_ops || !vma->vm_ops->fault))
+ if ((flags & FOLL_DUMP) &&
+ (vma_is_anonymous(vma) || !vma->vm_ops->fault))
return ERR_PTR(-EFAULT);
return NULL;
}
--
2.20.1
Powered by blists - more mailing lists