* mm/gup/writeback: add callbacks for inaccessible pages: fixup for linux-next
@ 2020-02-26 11:12 Christian Borntraeger
0 siblings, 0 replies; only message in thread
From: Christian Borntraeger @ 2020-02-26 11:12 UTC (permalink / raw)
To: Andrew Morton, Claudio Imbrenda; +Cc: linux-mm, kvm list, linux-s390
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))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-02-26 11:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-26 11:12 mm/gup/writeback: add callbacks for inaccessible pages: fixup for linux-next Christian Borntraeger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).