Skip to contentSkip to conversation

acct_arg_size: ptl is no longer needed for add_mm_counter()

PATCH In review Oleg Nesterov 2 participants 2 messages Jul 13, 2011 – Jul 14, 2011

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

PATCH 1/1 acct_arg_size: ptl is no longer needed for add_mm_counter()

acct_arg_size() takes ->page_table_lock around add_mm_counter() if !SPLIT_RSS_COUNTING. This is no needed after 172703b0 "mm: delete non-atomic mm counter implementation".

---

 fs/exec.c |    7 -------
 1 file changed, 7 deletions(-)
fs/exec.c renamed from fs/exec.c~acct_arg_size-no-ptl +0 -7
@@ -181,14 +181,7 @@ static void acct_arg_size(struct linux_b
 		return;
 
 	bprm->vma_pages = pages;
-
-#ifdef SPLIT_RSS_COUNTING
 	add_mm_counter(mm, MM_ANONPAGES, diff);
-#else
-	spin_lock(&mm->page_table_lock);
-	add_mm_counter(mm, MM_ANONPAGES, diff);
-	spin_unlock(&mm->page_table_lock);
-#endif
 }
 
 static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,