From: Anshuman Khandual <anshuman.khandual@arm.com>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: Anshuman Khandual <anshuman.khandual@arm.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH V2 4/4] mm/vma: Replace all remaining open encodings with vma_is_anonymous()
Date: Mon, 24 Feb 2020 10:33:13 +0530 [thread overview]
Message-ID: <1582520593-30704-5-git-send-email-anshuman.khandual@arm.com> (raw)
In-Reply-To: <1582520593-30704-1-git-send-email-anshuman.khandual@arm.com>
This replaces all remaining open encodings with vma_is_anonymous().
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.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
next prev parent reply other threads:[~2020-02-24 5:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-24 5:03 [PATCH V2 0/4] mm/vma: Use all available wrappers when possible Anshuman Khandual
2020-02-24 5:03 ` [PATCH V2 1/4] mm/vma: Add missing VMA flag readable name for VM_SYNC Anshuman Khandual
2020-02-26 17:38 ` Vlastimil Babka
2020-02-24 5:03 ` [PATCH V2 2/4] mm/vma: Make vma_is_accessible() available for general use Anshuman Khandual
2020-02-26 17:39 ` Vlastimil Babka
2020-02-24 5:03 ` [PATCH V2 3/4] mm/vma: Replace all remaining open encodings with is_vm_hugetlb_page() Anshuman Khandual
2020-02-26 17:40 ` Vlastimil Babka
2020-02-24 5:03 ` Anshuman Khandual [this message]
2020-02-26 17:42 ` [PATCH V2 4/4] mm/vma: Replace all remaining open encodings with vma_is_anonymous() Vlastimil Babka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1582520593-30704-5-git-send-email-anshuman.khandual@arm.com \
--to=anshuman.khandual@arm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).