summaryrefslogtreecommitdiffstats
path: root/arch/s390/mm/gup.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-04-06 11:57:19 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-04-06 11:57:19 +0200
commit1bb025f6db789ea0bb674eaed15ee843ef0b2e88 (patch)
treecdbaa7f57ce541abb5b973803712a9f55307c355 /arch/s390/mm/gup.c
parentLinux 4.6-rc1 (diff)
parentextcon: palmas: Drop stray IRQF_EARLY_RESUME flag (diff)
downloadlinux-1bb025f6db789ea0bb674eaed15ee843ef0b2e88.tar.xz
linux-1bb025f6db789ea0bb674eaed15ee843ef0b2e88.zip
Merge tag 'extcon-fixes-for-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-linus
Chanwoo writes: Update extcon for v4.6-rc3 This patch fixes the following one issue: - In extcon-palmas.c, the external abort happen when wake-up from suspend state on BeagleBoard-X15 platform. So, drop the IRQF_EARLY_RESUME flag.
Diffstat (limited to 'arch/s390/mm/gup.c')
-rw-r--r--arch/s390/mm/gup.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/s390/mm/gup.c b/arch/s390/mm/gup.c
index 49a1c84ed266..a8a6765f1a51 100644
--- a/arch/s390/mm/gup.c
+++ b/arch/s390/mm/gup.c
@@ -20,9 +20,9 @@
static inline int gup_pte_range(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
unsigned long end, int write, struct page **pages, int *nr)
{
+ struct page *head, *page;
unsigned long mask;
pte_t *ptep, pte;
- struct page *page;
mask = (write ? _PAGE_PROTECT : 0) | _PAGE_INVALID | _PAGE_SPECIAL;
@@ -37,12 +37,14 @@ static inline int gup_pte_range(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
return 0;
VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
page = pte_page(pte);
- if (!page_cache_get_speculative(page))
+ head = compound_head(page);
+ if (!page_cache_get_speculative(head))
return 0;
if (unlikely(pte_val(pte) != pte_val(*ptep))) {
- put_page(page);
+ put_page(head);
return 0;
}
+ VM_BUG_ON_PAGE(compound_head(page) != head, page);
pages[*nr] = page;
(*nr)++;