aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/mm')
-rw-r--r--arch/s390/mm/pgtable.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
index 37b8241ec784..f90ad8592b36 100644
--- a/arch/s390/mm/pgtable.c
+++ b/arch/s390/mm/pgtable.c
@@ -1279,6 +1279,7 @@ static unsigned long page_table_realloc_pmd(struct mmu_gather *tlb,
1279{ 1279{
1280 unsigned long next, *table, *new; 1280 unsigned long next, *table, *new;
1281 struct page *page; 1281 struct page *page;
1282 spinlock_t *ptl;
1282 pmd_t *pmd; 1283 pmd_t *pmd;
1283 1284
1284 pmd = pmd_offset(pud, addr); 1285 pmd = pmd_offset(pud, addr);
@@ -1296,7 +1297,7 @@ again:
1296 if (!new) 1297 if (!new)
1297 return -ENOMEM; 1298 return -ENOMEM;
1298 1299
1299 spin_lock(&mm->page_table_lock); 1300 ptl = pmd_lock(mm, pmd);
1300 if (likely((unsigned long *) pmd_deref(*pmd) == table)) { 1301 if (likely((unsigned long *) pmd_deref(*pmd) == table)) {
1301 /* Nuke pmd entry pointing to the "short" page table */ 1302 /* Nuke pmd entry pointing to the "short" page table */
1302 pmdp_flush_lazy(mm, addr, pmd); 1303 pmdp_flush_lazy(mm, addr, pmd);
@@ -1310,7 +1311,7 @@ again:
1310 page_table_free_rcu(tlb, table); 1311 page_table_free_rcu(tlb, table);
1311 new = NULL; 1312 new = NULL;
1312 } 1313 }
1313 spin_unlock(&mm->page_table_lock); 1314 spin_unlock(ptl);
1314 if (new) { 1315 if (new) {
1315 page_table_free_pgste(new); 1316 page_table_free_pgste(new);
1316 goto again; 1317 goto again;