From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail191.messagelabs.com (mail191.messagelabs.com [216.82.242.19]) by kanga.kvack.org (Postfix) with ESMTP id 7674E8D0039 for ; Sun, 6 Feb 2011 05:49:07 -0500 (EST) Received: by pzk27 with SMTP id 27so859516pzk.14 for ; Sun, 06 Feb 2011 02:49:05 -0800 (PST) From: Minchan Kim Subject: [PATCH v4 2/6] hugetlbfs: Change remove_from_page_cache Date: Sun, 6 Feb 2011 19:48:01 +0900 Message-Id: <181a91bedeefb055e0fc88f16a340aa0c58ad34a.1296987110.git.minchan.kim@gmail.com> In-Reply-To: References: In-Reply-To: References: Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: linux-mm , LKML , KAMEZAWA Hiroyuki , Hugh Dickins , Mel Gorman , KOSAKI Motohiro , Johannes Weiner , Minchan Kim , William Irwin 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 decreasing page reference by caller. 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: Minchan Kim --- fs/hugetlbfs/inode.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 9885082..b9eeb1c 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) -- 1.7.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. 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: email@kvack.org