mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH mm] linear pte_file fix
Date: Wed, 28 Sep 2005 21:01:02 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.61.0509282057290.20548@goblin.wat.veritas.com> (raw)

My recent mm patch to give pte_ERROR in do_file_page unless VM_NONLINEAR
was incorrect.  I was forgetting Oleg's patch to the populate functions,
which forces install_file_pte when MAP_POPULATE + MAP_NONBLOCK but page
not in cache (in case an existing nonlinear entry needs removing).  But
that's only necessary in the VM_NONLINEAR case: let's keep the strict
check in do_file_page, and adjust filemap_populate and shmem_populate.

Signed-off-by: Hugh Dickins <hugh@veritas.com>

--- 2.6.14-rc2-mm1/mm/filemap.c	2005-09-22 12:32:03.000000000 +0100
+++ linux/mm/filemap.c	2005-09-28 20:38:20.000000000 +0100
@@ -1542,7 +1542,7 @@ repeat:
 			page_cache_release(page);
 			return err;
 		}
-	} else {
+	} else if (vma->vm_flags & VM_NONLINEAR) {
 		/* No page was found just because we can't read it in now (being
 		 * here implies nonblock != 0), but the page may exist, so set
 		 * the PTE to fault it in later. */
--- 2.6.14-rc2-mm1/mm/shmem.c	2005-09-22 12:32:04.000000000 +0100
+++ linux/mm/shmem.c	2005-09-28 20:40:23.000000000 +0100
@@ -1201,7 +1201,7 @@ static int shmem_populate(struct vm_area
 				page_cache_release(page);
 				return err;
 			}
-		} else {
+		} else if (vma->vm_flags & VM_NONLINEAR) {
 			/* No page was found just because we can't read it in
 			 * now (being here implies nonblock != 0), but the page
 			 * may exist, so set the PTE to fault it in later. */

                 reply	other threads:[~2005-09-28 20:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Pine.LNX.4.61.0509282057290.20548@goblin.wat.veritas.com \
    --to=hugh@veritas.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®