From: Minchan Kim Date: Tue, 22 Mar 2011 23:30:54 +0000 (-0700) Subject: mm: hugetlbfs: change remove_from_page_cache X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bd65cb86c98a79bc61afd0d80166005f125e9064;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git mm: hugetlbfs: change remove_from_page_cache 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 Cc: William Irwin Acked-by: Hugh Dickins Acked-by: Mel Gorman Reviewed-by: KAMEZAWA Hiroyuki Reviewed-by: Johannes Weiner Reviewed-by: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 9885082b470..b9eeb1cd03f 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c @@ -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)