mm: gup: gup_must_unshare()

Introduce gup_must_unshare(): the GUP logic that decides on which
pages to activate the GUP unsharing with the COR fault (setting
FAULT_FLAG_UNSHARE) while taking readonly page pins on all
write-protected pages.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
2 files changed