mm: hugetlbfs: change remove_from_page_cache
authorMinchan Kim <minchan.kim@gmail.com>
Tue, 22 Mar 2011 23:30:54 +0000 (16:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Mar 2011 00:44:02 +0000 (17:44 -0700)
This patch series changes remove_from_page_cache()'s page ref counting
rule.  Page cache ref count is decreased in delete_from_page_cache().  So
we don't need to decrease the page reference in callers.

Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Cc: William Irwin <wli@holomorphy.com>
Acked-by: Hugh Dickins <hughd@google.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/hugetlbfs/inode.c

index 9885082b470f72eef35b2fa286affb9a58ecbdc2..b9eeb1cd03ff540dc87aa31f43dc9eb03fbafb61 100644 (file)
@@ -332,8 +332,7 @@ static void truncate_huge_page(struct page *page)
 {
        cancel_dirty_page(page, /* No IO accounting for huge pages? */0);
        ClearPageUptodate(page);
-       remove_from_page_cache(page);
-       put_page(page);
+       delete_from_page_cache(page);
 }
 
 static void truncate_hugepages(struct inode *inode, loff_t lstart)