From: Lee Schermerhorn <lee.schermerhorn@hp.com>
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: akpm@linux-foundation.org
Cc: riel@redhat.com, linux-mm <linux-mm@kvack.org>,
kosaki.motohiro@jp.fujitsu.com
Subject: [PATCH 1/6] Mlock: fix __mlock_vma_pages_range comment block
Date: Tue, 19 Aug 2008 17:05:15 -0400 [thread overview]
Message-ID: <20080819210515.27199.60378.sendpatchset@lts-notebook> (raw)
In-Reply-To: <20080819210509.27199.6626.sendpatchset@lts-notebook>
Against: 2.6.27-rc3-mmotm-080819-0259:
fix to mmap-handle-mlocked-pages-during-map-remap-unmap.patch
__mlock_vma_pages_range comment block needs updating:
- it fails to mention the mlock parameter
- no longer requires that mmap_sem be held for write.
following patch fixes it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
mm/mlock.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
Index: linux-2.6.27-rc3-mmotm/mm/mlock.c
===================================================================
--- linux-2.6.27-rc3-mmotm.orig/mm/mlock.c 2008-08-18 11:41:19.000000000 -0400
+++ linux-2.6.27-rc3-mmotm/mm/mlock.c 2008-08-18 11:48:13.000000000 -0400
@@ -112,12 +112,20 @@ static void munlock_vma_page(struct page
}
}
-/*
- * mlock a range of pages in the vma.
+/**
+ * __mlock_vma_pages_range() - mlock/munlock a range of pages in the vma.
+ * @vma: target vma
+ * @start: start address
+ * @end: end address
+ * @mlock: 0 indicate munlock, otherwise mlock.
+ *
+ * If @mlock == 0, unlock an mlocked range;
+ * else mlock the range of pages. This takes care of making the pages present ,
+ * too.
*
- * This takes care of making the pages present too.
+ * return 0 on success, negative error code on error.
*
- * vma->vm_mm->mmap_sem must be held for write.
+ * vma->vm_mm->mmap_sem must be held for at least read.
*/
static int __mlock_vma_pages_range(struct vm_area_struct *vma,
unsigned long start, unsigned long end,
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-08-19 21:05 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-19 21:05 [Patch 0/6] Mlock: doc, patch grouping and error return cleanups Lee Schermerhorn
2008-08-19 21:05 ` Lee Schermerhorn, KOSAKI Motohiro [this message]
2008-08-19 21:05 ` [PATCH 2/6] Mlock: backout locked_vm adjustment during mmap() Lee Schermerhorn, KOSAKI Motohiro
2008-08-19 21:05 ` [PATCH 3/6] Mlock: resubmit locked_vm adjustment as separate patch Lee Schermerhorn, Lee Schermerhorn
2008-08-19 21:05 ` [PATCH 4/6] Mlock: fix return value for munmap/mlock vma race Lee Schermerhorn, KOSAKI Motohiro
2008-08-20 8:31 ` KOSAKI Motohiro
2008-08-19 21:05 ` [PATCH 5/6] Mlock: revert mainline handling of mlock error return Lee Schermerhorn, Lee Schermerhorn
2008-08-20 7:20 ` KOSAKI Motohiro
2008-08-20 7:24 ` KOSAKI Motohiro
2008-08-19 21:05 ` [PATCH 6/6] Mlock: make mlock error return Posixly Correct Lee Schermerhorn, KOSAKI Motohiro
2008-08-20 8:35 ` KOSAKI Motohiro
2008-08-20 16:24 ` Lee Schermerhorn
2008-08-20 17:58 ` KOSAKI Motohiro
2008-08-20 19:04 ` Lee Schermerhorn
2008-08-22 20:48 ` Lee Schermerhorn
2008-08-20 10:17 ` Pekka Enberg
2008-08-20 16:26 ` Lee Schermerhorn
2008-08-20 7:21 ` [Patch 0/6] Mlock: doc, patch grouping and error return cleanups KOSAKI Motohiro
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=20080819210515.27199.60378.sendpatchset@lts-notebook \
--to=lee.schermerhorn@hp.com \
--cc=akpm@linux-foundation.org \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=riel@redhat.com \
/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