]> git.baikalelectronics.ru Git - kernel.git/commit
mm: fix status code which move_pages() returns for zero page
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Fri, 4 Sep 2015 22:47:53 +0000 (15:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 Sep 2015 23:54:41 +0000 (16:54 -0700)
commit25c6d6c6d49770c7c63d697fca1c3e6203377b1e
treef20414a3a4217e6befb38b5adeefdc2e6a4e8c00
parentaf6a903197ea8a03703645f0590f61d342c191a5
mm: fix status code which move_pages() returns for zero page

The manpage for move_pages(2) specifies that status code for zero page is
supposed to be -EFAULT.  Currently kernel return -ENOENT in this case.

follow_page() can do it for us, if we would ask for FOLL_DUMP.  The use of
FOLL_DUMP also means that the upper layer page tables pages are no longer
allocated.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reviewed-by: Christoph Lameter <cl@linux.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/migrate.c