Skip to content

Commit

Permalink
[PATCH] mm: fix rss counter being incremented when unmapping
Browse files Browse the repository at this point in the history
This patch fixes a bug introduced by the "mm counter operations through
macros" patch, which replaced a decrement operation in with an increment
macro in try_to_unmap_one().

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
dotdash authored and Linus Torvalds committed May 17, 2005
1 parent 7a5febe commit 202d182
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma)
dec_mm_counter(mm, anon_rss);
}

inc_mm_counter(mm, rss);
dec_mm_counter(mm, rss);
page_remove_rmap(page);
page_cache_release(page);

Expand Down

0 comments on commit 202d182

Please sign in to comment.