]> git.baikalelectronics.ru Git - kernel.git/commit
userfaultfd: wrap the common dst_vma check into an inlined function
authorWei Yang <richardw.yang@linux.intel.com>
Sun, 1 Dec 2019 01:57:55 +0000 (17:57 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 1 Dec 2019 20:59:10 +0000 (12:59 -0800)
commit595ba47beed94c801f2006d4baad2f3a89098574
treee5328c386db4b441662de7661180756438b245af
parente41ab3646eee6d09822832cf9d9468cc438bb3b6
userfaultfd: wrap the common dst_vma check into an inlined function

When doing UFFDIO_COPY, it is necessary to find the correct destination
vma and make sure fault range is in it.

Since there are two places need to do the same task, just wrap those
common check into an inlined function.

Link: http://lkml.kernel.org/r/20190927070032.2129-3-richardw.yang@linux.intel.com
Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Andrea Arcangeli <aarcange@redhat.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/userfaultfd.c