diff mbox series

mm/gup/writeback: add callbacks for inaccessible pages: fixup for linux-next

Message ID 1da2ebcf-59bd-65a1-222a-26af953ac7c5@de.ibm.com
State New
Headers show
Series mm/gup/writeback: add callbacks for inaccessible pages: fixup for linux-next | expand

Commit Message

Christian Borntraeger Feb. 26, 2020, 11:12 a.m. UTC
Claudio,

the patch with the arch callbacks has a (simple) merge conflict with
the longterm pinning changes in next. Can you maybe re-do this patch
on top of linux-next and send this patch to Andrew. This actually 
also means that this patch should ideally go via Andrew and not via
my tree.

Patch is here.

https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git/commit/?h=next&id=732b80e677b80813e2f862ce92448436540222a3

this is my quick attempt to fix this up

+++ b/mm/gup.c
@@@ -470,11 -269,18 +468,17 @@@ retry
                goto retry;
        }
  
 -      if (flags & FOLL_GET) {
 -              if (unlikely(!try_get_page(page))) {
 -                      page = ERR_PTR(-ENOMEM);
 -                      goto out;
 -              }
 -              ret = arch_make_page_accessible(page);
 -              if (ret) {
 -                      put_page(page);
 -                      page = ERR_PTR(ret);
 -                      goto out;
 -              }
 +      /* try_grab_page() does nothing unless FOLL_GET or FOLL_PIN is set. */
 +      if (unlikely(!try_grab_page(page, flags))) {
 +              page = ERR_PTR(-ENOMEM);
 +              goto out;
 +      }
++      ret = arch_make_page_accessible(page);
++      if (ret) {
++              put_page(page);
++              page = ERR_PTR(ret);
++              goto out;
+       }
        if (flags & FOLL_TOUCH) {
                if ((flags & FOLL_WRITE) &&
                    !pte_dirty(pte) && !PageDirty(page))
diff mbox series

Patch

diff --cc mm/gup.c
index f589299b0d4a,354bcfbd844b..a025d28ffbfd
--- a/mm/gup.c