diff options
author | Minchan Kim <[email protected]> | 2011-03-22 16:30:54 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2011-03-22 17:44:02 -0700 |
commit | bd65cb86c98a79bc61afd0d80166005f125e9064 (patch) | |
tree | 7980a38792c6855346e6d3b8c15a876dca9b50f8 | |
parent | 97cecb5a254fec22d28ef32235d888bfbfd7c783 (diff) |
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 <[email protected]>
Cc: William Irwin <[email protected]>
Acked-by: Hugh Dickins <[email protected]>
Acked-by: Mel Gorman <[email protected]>
Reviewed-by: KAMEZAWA Hiroyuki <[email protected]>
Reviewed-by: Johannes Weiner <[email protected]>
Reviewed-by: KOSAKI Motohiro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | 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 9885082b470f..b9eeb1cd03ff 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) |