public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: mvw@planets.elm.net
Cc: linux-kernel@vger.kernel.org
Subject: [2.6 patch] quota: make some code static
Date: Sat, 8 Jan 2005 23:05:58 +0100	[thread overview]
Message-ID: <20050108220558.GF14108@stusta.de> (raw)

The patch below makes some needlessly global code static.

The most interesting part is that dquot_cachep can become static, since 
it isn't used outside of dquot.c .


diffstat output:
 fs/dquot.c           |    8 ++++----
 fs/quota.c           |    2 +-
 include/linux/slab.h |    1 -
 3 files changed, 5 insertions(+), 6 deletions(-)


Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.10-mm2-full/include/linux/slab.h.old	2005-01-08 17:18:39.000000000 +0100
+++ linux-2.6.10-mm2-full/include/linux/slab.h	2005-01-08 17:18:45.000000000 +0100
@@ -118,7 +118,6 @@
 extern kmem_cache_t	*names_cachep;
 extern kmem_cache_t	*files_cachep;
 extern kmem_cache_t	*filp_cachep;
-extern kmem_cache_t	*dquot_cachep;
 extern kmem_cache_t	*fs_cachep;
 extern kmem_cache_t	*signal_cachep;
 extern kmem_cache_t	*sighand_cachep;
--- linux-2.6.10-mm2-full/fs/dquot.c.old	2005-01-08 17:17:28.000000000 +0100
+++ linux-2.6.10-mm2-full/fs/dquot.c	2005-01-08 17:18:29.000000000 +0100
@@ -128,6 +128,9 @@
 static struct quota_format_type *quota_formats;	/* List of registered formats */
 static struct quota_module_name module_names[] = INIT_QUOTA_MODULE_NAMES;
 
+/* SLAB cache for dquot structures */
+static kmem_cache_t *dquot_cachep;
+
 int register_quota_format(struct quota_format_type *fmt)
 {
 	spin_lock(&dq_list_lock);
@@ -199,7 +202,7 @@
 
 static LIST_HEAD(inuse_list);
 static LIST_HEAD(free_dquots);
-unsigned int dq_hash_bits, dq_hash_mask;
+static unsigned int dq_hash_bits, dq_hash_mask;
 static struct hlist_head *dquot_hash;
 
 struct dqstats dqstats;
@@ -1781,9 +1784,6 @@
 	{ .ctl_name = 0 },
 };
 
-/* SLAB cache for dquot structures */
-kmem_cache_t *dquot_cachep;
-
 static int __init dquot_init(void)
 {
 	int i;
--- linux-2.6.10-mm2-full/fs/quota.c.old	2005-01-08 17:19:08.000000000 +0100
+++ linux-2.6.10-mm2-full/fs/quota.c	2005-01-08 17:19:17.000000000 +0100
@@ -136,7 +136,7 @@
 	return NULL;
 }
 
-void quota_sync_sb(struct super_block *sb, int type)
+static void quota_sync_sb(struct super_block *sb, int type)
 {
 	int cnt;
 	struct inode *discard[MAXQUOTAS];


                 reply	other threads:[~2005-01-08 22:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20050108220558.GF14108@stusta.de \
    --to=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mvw@planets.elm.net \
    /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