[PATCH v2 2/7] fuse: Change remove_from_page_cache

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Minchan Kim
Date: Sunday, January 2, 2011 - 8:44 am

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: Miklos Szeredi <miklos@szeredi.hu>
Cc: fuse-devel@lists.sourceforge.net
Acked-by: Hugh Dickins <hughd@google.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
---
 fs/fuse/dev.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index cf8d28d..1ef24fb 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -737,8 +737,7 @@ static int fuse_try_move_page(struct fuse_copy_state *cs, struct page **pagep)
 	if (WARN_ON(PageMlocked(oldpage)))
 		goto out_fallback_unlock;
 
-	remove_from_page_cache(oldpage);
-	page_cache_release(oldpage);
+	delete_from_page_cache(oldpage);
 
 	err = add_to_page_cache_locked(newpage, mapping, index, GFP_KERNEL);
 	if (err) {
-- 
1.7.0.4

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v2 1/7] Introduce delete_from_page_cache, Minchan Kim, (Sun Jan 2, 8:44 am)
[PATCH v2 2/7] fuse: Change remove_from_page_cache, Minchan Kim, (Sun Jan 2, 8:44 am)
[PATCH v2 3/7] tlbfs: Change remove_from_page_cache, Minchan Kim, (Sun Jan 2, 8:44 am)
[PATCH v2 4/7] swap: Change remove_from_page_cache, Minchan Kim, (Sun Jan 2, 8:44 am)
[PATCH v2 6/7] Good bye remove_from_page_cache, Minchan Kim, (Sun Jan 2, 8:44 am)
[PATCH v2 7/7] Change __remove_from_page_cache, Minchan Kim, (Sun Jan 2, 8:44 am)
Re: [PATCH v2 6/7] Good bye remove_from_page_cache, KAMEZAWA Hiroyuki, (Mon Jan 3, 6:44 pm)
Re: [PATCH v2 7/7] Change __remove_from_page_cache, KAMEZAWA Hiroyuki, (Mon Jan 3, 6:45 pm)