linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 5/5] mm/vma: Replace all remaining open encodings with vma_is_anonymous()
Date: Mon, 17 Feb 2020 10:33:53 +0530	[thread overview]
Message-ID: <1581915833-21984-6-git-send-email-anshuman.khandual@arm.com> (raw)
In-Reply-To: <1581915833-21984-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


      parent reply	other threads:[~2020-02-17  5:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-17  5:03 [PATCH 0/5] mm/vma: Use available wrappers when possible Anshuman Khandual
2020-02-17  5:03 ` [PATCH 1/5] mm/vma: Add missing VMA flag readable name for VM_SYNC Anshuman Khandual
2020-02-17  5:03 ` [PATCH 2/5] mm/vma: Make vma_is_accessible() available for general use Anshuman Khandual
2020-02-17  7:36   ` Geert Uytterhoeven
2020-02-17  9:28   ` Anshuman Khandual
2020-02-18  2:21   ` Guo Ren
2020-02-17  5:03 ` [PATCH 3/5] mm/vma: Replace all remaining open encodings with is_vm_hugetlb_page() Anshuman Khandual
2020-02-17  9:21   ` Anshuman Khandual
2020-02-19  1:14   ` kbuild test robot
2020-02-24  2:21     ` Anshuman Khandual
2020-02-17  5:03 ` [PATCH 4/5] mm/vma: Replace all remaining open encodings with vma_set_anonymous() Anshuman Khandual
2020-02-17 10:27   ` Kirill A. Shutemov
2020-02-17 11:56     ` Anshuman Khandual
2020-03-18 10:24   ` Greg Kroah-Hartman
2020-03-18 10:41     ` Anshuman Khandual
2020-02-17  5:03 ` Anshuman Khandual [this message]

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=1581915833-21984-6-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).