]> git.baikalelectronics.ru Git - kernel.git/commit
mm: make GUP handle pfn mapping unless FOLL_GET is requested
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Fri, 4 Sep 2015 22:47:55 +0000 (15:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 Sep 2015 23:54:41 +0000 (16:54 -0700)
commitc570aa9d435f43f294f3982222ad0403a4ba3aa1
tree50e449c857ede1011ba8a3c8d7714ce98602ed32
parent25c6d6c6d49770c7c63d697fca1c3e6203377b1e
mm: make GUP handle pfn mapping unless FOLL_GET is requested

With DAX, pfn mapping becoming more common.  The patch adjusts GUP code to
cover pfn mapping for cases when we don't need struct page to proceed.

To make it possible, let's change follow_page() code to return -EEXIST
error code if proper page table entry exists, but no corresponding struct
page.  __get_user_page() would ignore the error code and move to the next
page frame.

The immediate effect of the change is working MAP_POPULATE and mlock() on
DAX mappings.

[akpm@linux-foundation.org: fix arm64 build]
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reviewed-by: Toshi Kani <toshi.kani@hp.com>
Acked-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/gup.c