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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

diff --cc mm/gup.c
index f589299b0d4a,354bcfbd844b..a025d28ffbfd
--- a/mm/gup.c
+++ 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))




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux