Commit 978364b9 authored by Christoph Hellwig's avatar Christoph Hellwig

[PATCH] buffermem_pages removal (5/5)

No more users of buffermem_pages are left, remove it.
While at it also remove some orphaned externs around it in swap.h
parent 71e6cd0a
......@@ -36,9 +36,6 @@
#define BH_ENTRY(list) list_entry((list), struct buffer_head, b_assoc_buffers)
/* This is used by some architectures to estimate available memory. */
atomic_t buffermem_pages = ATOMIC_INIT(0);
/*
* Hashed waitqueue_head's for wait_on_buffer()
*/
......@@ -151,10 +148,6 @@ void __wait_on_buffer(struct buffer_head * bh)
static inline void
__set_page_buffers(struct page *page, struct buffer_head *head)
{
struct inode *inode = page->mapping->host;
if (inode && S_ISBLK(inode->i_mode))
atomic_inc(&buffermem_pages);
if (page_has_buffers(page))
buffer_error();
set_page_buffers(page, head);
......@@ -164,14 +157,6 @@ __set_page_buffers(struct page *page, struct buffer_head *head)
static inline void
__clear_page_buffers(struct page *page)
{
struct address_space *mapping = page->mapping;
if (mapping) {
struct inode *inode = mapping->host;
if (S_ISBLK(inode->i_mode))
atomic_dec(&buffermem_pages);
}
clear_page_buffers(page);
page_cache_release(page);
}
......
......@@ -102,12 +102,8 @@ extern unsigned long totalhigh_pages;
extern unsigned int nr_free_pages(void);
extern unsigned int nr_free_buffer_pages(void);
extern unsigned int nr_free_pagecache_pages(void);
extern unsigned long nr_buffermem_pages(void);
extern int nr_active_pages;
extern int nr_inactive_pages;
extern atomic_t nr_async_pages;
extern atomic_t buffermem_pages;
extern spinlock_t pagecache_lock;
extern void __remove_inode_page(struct page *);
/* Incomplete types for prototype declarations: */
......
......@@ -569,11 +569,6 @@ unsigned int nr_free_highpages (void)
}
#endif
unsigned long nr_buffermem_pages(void)
{
return atomic_read(&buffermem_pages);
}
/*
* Accumulate the page_state information across all CPUs.
* The result is unavoidably approximate - it can change
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment