public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] buffermem_pages removal (5/5)
Date: Tue, 21 May 2002 14:10:16 +0100	[thread overview]
Message-ID: <20020521141015.E15796@infradead.org> (raw)

No more users of buffermem_pages are left, remove it.
While at it also remove some orphaned externs around it in swap.h


--- 1.102/fs/buffer.c	Mon May 20 15:40:11 2002
+++ edited/fs/buffer.c	Tue May 21 13:55:53 2002
@@ -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 @@
 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 @@
 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);
 }
--- 1.43/include/linux/swap.h	Mon May 20 17:07:21 2002
+++ edited/include/linux/swap.h	Tue May 21 14:35:22 2002
@@ -102,12 +102,8 @@
 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: */
--- 1.57/mm/page_alloc.c	Sun May  5 18:56:08 2002
+++ edited/mm/page_alloc.c	Tue May 21 14:27:32 2002
@@ -569,11 +569,6 @@
 }
 #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

             reply	other threads:[~2002-05-21 13:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-21 13:10 Christoph Hellwig [this message]
2002-05-21 17:51 ` [PATCH] buffermem_pages removal (5/5) Andrew Morton
2002-05-21 17:53   ` Christoph Hellwig
2002-05-21 18:27     ` Andrew Morton
2002-05-21 21:54       ` Martin J. Bligh
2002-05-22  3:53       ` Daniel Phillips

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020521141015.E15796@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox