Skip to contentSkip to conversation

pdm_trans_unstable problem

PATCH New Andrea Arcangeli 1 participant 2 messages Mar 23, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pdm_trans_unstable problem

Hi,

While git rebasing I got rejects in certain locations. This would be my remaining diff.

Andrea Arcangeli (1):
mm: thp: fixup pmd_trans_unstable() locations

 fs/proc/task_mmu.c |    5 ++---
 mm/memcontrol.c    |    4 ++++
 2 files changed, 6 insertions(+), 3 deletions(-)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#1 lore raw

PATCH 1/1 mm: thp: fixup pmd_trans_unstable() locations

pmd_trans_unstable shall be called before pmd_offset_map in the locations where the mmap_sem is hold for reading.

---
 fs/proc/task_mmu.c |    5 ++---
 mm/memcontrol.c    |    4 ++++
 2 files changed, 6 insertions(+), 3 deletions(-)
fs/proc/task_mmu.c +2 -3
index 9694cc2..c283832 100644
@@ -781,9 +781,6 @@ static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
 	int err = 0;
 	pagemap_entry_t pme = make_pme(PM_NOT_PRESENT);
 
-	if (pmd_trans_unstable(pmd))
-		return 0;
-
 	/* find the first VMA at or above 'addr' */
 	vma = find_vma(walk->mm, addr);
 	spin_lock(&walk->mm->page_table_lock);
@@ -802,6 +799,8 @@ static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
 		return err;
 	}
 
+	if (pmd_trans_unstable(pmd))
+		return 0;
 	for (; addr != end; addr += PAGE_SIZE) {
 
 		/* check to see if we've left 'vma' behind
mm/memcontrol.c +4 -0
index b2ee6df..7d698df 100644
@@ -5306,6 +5306,8 @@ static int mem_cgroup_count_precharge_pte_range(pmd_t *pmd,
 		return 0;
 	}
 
+	if (pmd_trans_unstable(pmd))
+		return 0;
 	pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
 	for (; addr != end; pte++, addr += PAGE_SIZE)
 		if (get_mctgt_type(vma, addr, *pte, NULL))
@@ -5502,6 +5504,8 @@ static int mem_cgroup_move_charge_pte_range(pmd_t *pmd,
 		return 0;
 	}
 
+	if (pmd_trans_unstable(pmd))
+		return 0;
 retry:
 	pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
 	for (; addr != end; addr += PAGE_SIZE) {

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>