Skip to content

Commit

Permalink
mm: change __remove_from_page_cache()
Browse files Browse the repository at this point in the history
Now we renamed remove_from_page_cache with delete_from_page_cache.  As
consistency of __remove_from_swap_cache and remove_from_swap_cache, we
change internal page cache handling function name, too.

Signed-off-by: Minchan Kim <[email protected]>
Cc: Christoph Hellwig <[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]>
  • Loading branch information
Minchan Kim authored and torvalds committed Mar 23, 2011
1 parent 702cfbf commit e64a782
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion include/linux/pagemap.h
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ int add_to_page_cache_locked(struct page *page, struct address_space *mapping,
int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
pgoff_t index, gfp_t gfp_mask);
extern void delete_from_page_cache(struct page *page);
extern void __remove_from_page_cache(struct page *page);
extern void __delete_from_page_cache(struct page *page);
int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask);

/*
Expand Down
8 changes: 4 additions & 4 deletions mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@
*/

/*
* Remove a page from the page cache and free it. Caller has to make
* Delete a page from the page cache and free it. Caller has to make
* sure the page is locked and that nobody else uses it - or that usage
* is safe. The caller must hold the mapping's tree_lock.
*/
void __remove_from_page_cache(struct page *page)
void __delete_from_page_cache(struct page *page)
{
struct address_space *mapping = page->mapping;

Expand Down Expand Up @@ -154,7 +154,7 @@ void delete_from_page_cache(struct page *page)

freepage = mapping->a_ops->freepage;
spin_lock_irq(&mapping->tree_lock);
__remove_from_page_cache(page);
__delete_from_page_cache(page);
spin_unlock_irq(&mapping->tree_lock);
mem_cgroup_uncharge_cache_page(page);

Expand Down Expand Up @@ -444,7 +444,7 @@ int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask)
new->index = offset;

spin_lock_irq(&mapping->tree_lock);
__remove_from_page_cache(old);
__delete_from_page_cache(old);
error = radix_tree_insert(&mapping->page_tree, offset, new);
BUG_ON(error);
mapping->nrpages++;
Expand Down
2 changes: 1 addition & 1 deletion mm/memory-failure.c
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ int __memory_failure(unsigned long pfn, int trapno, int flags)

/*
* Now take care of user space mappings.
* Abort on fail: __remove_from_page_cache() assumes unmapped page.
* Abort on fail: __delete_from_page_cache() assumes unmapped page.
*/
if (hwpoison_user_mappings(p, pfn, trapno) != SWAP_SUCCESS) {
printk(KERN_ERR "MCE %#lx: cannot unmap page, give up\n", pfn);
Expand Down
2 changes: 1 addition & 1 deletion mm/truncate.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ invalidate_complete_page2(struct address_space *mapping, struct page *page)

clear_page_mlock(page);
BUG_ON(page_has_private(page));
__remove_from_page_cache(page);
__delete_from_page_cache(page);
spin_unlock_irq(&mapping->tree_lock);
mem_cgroup_uncharge_cache_page(page);

Expand Down
2 changes: 1 addition & 1 deletion mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ static int __remove_mapping(struct address_space *mapping, struct page *page)

freepage = mapping->a_ops->freepage;

__remove_from_page_cache(page);
__delete_from_page_cache(page);
spin_unlock_irq(&mapping->tree_lock);
mem_cgroup_uncharge_cache_page(page);

Expand Down

0 comments on commit e64a782

Please sign in to comment.