]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - mm/gup.c
mm: describe mmap_sem rules for __lock_page_or_retry() and callers
authorPaul Cassella <cassella@cray.com>
Wed, 6 Aug 2014 23:07:24 +0000 (16:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Aug 2014 01:01:20 +0000 (18:01 -0700)
commit9a95f3cf7b33d66fa64727cff8cd2f2a9d09f335
tree14d7c178144b6de0b352b8e8d4b04ffdbae9a71c
parent4ffeaf3560a52b4a69cc7909873d08c0ef5909d4
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>
arch/x86/mm/fault.c
include/linux/pagemap.h
mm/filemap.c
mm/gup.c
mm/memory.c
mm/mlock.c