aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorPaul Cassella <cassella@cray.com>2014-08-06 19:07:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-06 21:01:20 -0400
commit9a95f3cf7b33d66fa64727cff8cd2f2a9d09f335 (patch)
tree14d7c178144b6de0b352b8e8d4b04ffdbae9a71c /include/linux
parent4ffeaf3560a52b4a69cc7909873d08c0ef5909d4 (diff)
mm: describe mmap_sem rules for __lock_page_or_retry() and callers
Add a comment describing the circumstances in which __lock_page_or_retry() will or will not release the mmap_sem when returning 0. Add comments to lock_page_or_retry()'s callers (filemap_fault(), do_swap_page()) noting the impact on VM_FAULT_RETRY returns. Add comments on up the call tree, particularly replacing the false "We return with mmap_sem still held" comments. Signed-off-by: Paul Cassella <cassella@cray.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pagemap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index e1474ae18c88..3df8c7db7a4e 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -484,6 +484,9 @@ static inline int lock_page_killable(struct page *page)
484/* 484/*
485 * lock_page_or_retry - Lock the page, unless this would block and the 485 * lock_page_or_retry - Lock the page, unless this would block and the
486 * caller indicated that it can handle a retry. 486 * caller indicated that it can handle a retry.
487 *
488 * Return value and mmap_sem implications depend on flags; see
489 * __lock_page_or_retry().
487 */ 490 */
488static inline int lock_page_or_retry(struct page *page, struct mm_struct *mm, 491static inline int lock_page_or_retry(struct page *page, struct mm_struct *mm,
489 unsigned int flags) 492 unsigned int flags)