From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@osdl.org>, NeilBrown <neilb@suse.de>
Cc: linux-kernel@vger.kernel.org, nfs@lists.sourceforge.net,
trond.myklebust@fys.uio.no
Subject: [RFC: -mm patch] fs/nfsd/export.c,net/sunrpc/cache.c: make needlessly global code static
Date: Mon, 13 Mar 2006 22:19:26 +0100 [thread overview]
Message-ID: <20060313211926.GJ13973@stusta.de> (raw)
In-Reply-To: <20060312031036.3a382581.akpm@osdl.org>
On Sun, Mar 12, 2006 at 03:10:36AM -0800, Andrew Morton wrote:
>...
> +knfsd-change-the-store-of-auth_domains-to-not-be-a-cache.patch
> +knfsd-change-the-store-of-auth_domains-to-not-be-a-cache-fix.patch
> +knfsd-change-the-store-of-auth_domains-to-not-be-a-cache-fix-2.patch
> +knfsd-change-the-store-of-auth_domains-to-not-be-a-cache-fix-3.patch
> +knfsd-change-the-store-of-auth_domains-to-not-be-a-cache-fix-3-fix.patch
> +knfsd-break-the-hard-linkage-from-svc_expkey-to-svc_export.patch
> +knfsd-get-rid-of-inplace-sunrpc-caches.patch
> +knfsd-create-cache_lookup-function-instead-of-using-a-macro-to-declare-one.patch
> +knfsd-convert-ip_map-cache-to-use-the-new-lookup-routine.patch
> +knfsd-use-new-cache_lookup-for-svc_export.patch
> +knfsd-use-new-cache_lookup-for-svc_expkey-cache.patch
> +knfsd-use-new-sunrpc-cache-for-rsi-cache.patch
> +knfsd-use-new-cache-code-for-rsc-cache.patch
> +knfsd-use-new-cache-code-for-name-id-lookup-caches.patch
> +knfsd-an-assortment-of-little-fixes-to-the-sunrpc-cache-code.patch
> +knfsd-remove-definecachelookup.patch
> +knfsd-unexport-cache_fresh-and-fix-a-small-race.patch
> +knfsd-convert-sunrpc_cache-to-use-krefs.patch
> +knfsd-convert-sunrpc_cache-to-use-krefs-fix.patch
>
> knfsd update
>...
We can now make some code static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
fs/nfsd/export.c | 13 ++++++++-----
include/linux/nfsd/export.h | 5 +----
include/linux/sunrpc/cache.h | 1 -
net/sunrpc/cache.c | 2 +-
net/sunrpc/sunrpc_syms.c | 1 -
5 files changed, 10 insertions(+), 12 deletions(-)
--- linux-2.6.16-rc6-mm1-full/include/linux/nfsd/export.h.old 2006-03-13 21:18:50.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/include/linux/nfsd/export.h 2006-03-13 21:20:05.000000000 +0100
@@ -86,9 +86,6 @@
void nfsd_export_flush(void);
void exp_readlock(void);
void exp_readunlock(void);
-struct svc_expkey * exp_find_key(struct auth_domain *clp,
- int fsid_type, u32 *fsidv,
- struct cache_req *reqp);
struct svc_export * exp_get_by_name(struct auth_domain *clp,
struct vfsmount *mnt,
struct dentry *dentry,
@@ -102,7 +99,7 @@
int exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp, struct cache_req *creq);
int nfserrno(int errno);
-extern struct cache_detail svc_export_cache, svc_expkey_cache;
+extern struct cache_detail svc_export_cache;
static inline void exp_put(struct svc_export *exp)
{
--- linux-2.6.16-rc6-mm1-full/fs/nfsd/export.c.old 2006-03-13 21:19:13.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/fs/nfsd/export.c 2006-03-13 21:25:02.000000000 +0100
@@ -57,7 +57,7 @@
#define EXPKEY_HASHMASK (EXPKEY_HASHMAX -1)
static struct cache_head *expkey_table[EXPKEY_HASHMAX];
-void expkey_put(struct kref *ref)
+static void expkey_put(struct kref *ref)
{
struct svc_expkey *key = container_of(ref, struct svc_expkey, h.ref);
@@ -87,6 +87,8 @@
static struct svc_expkey *svc_expkey_update(struct svc_expkey *new, struct svc_expkey *old);
static struct svc_expkey *svc_expkey_lookup(struct svc_expkey *);
+static struct cache_detail svc_expkey_cache;
+
static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
{
/* client fsidtype fsid [path] */
@@ -255,7 +257,7 @@
return NULL;
}
-struct cache_detail svc_expkey_cache = {
+static struct cache_detail svc_expkey_cache = {
.owner = THIS_MODULE,
.hash_size = EXPKEY_HASHMAX,
.hash_table = expkey_table,
@@ -345,7 +347,8 @@
(*bpp)[-1] = '\n';
}
-struct svc_export *svc_export_update(struct svc_export *new, struct svc_export *old);
+static struct svc_export *svc_export_update(struct svc_export *new,
+ struct svc_export *old);
static struct svc_export *svc_export_lookup(struct svc_export *);
static int check_export(struct inode *inode, int flags)
@@ -574,7 +577,7 @@
return NULL;
}
-struct svc_export *
+static struct svc_export *
svc_export_update(struct svc_export *new, struct svc_export *old)
{
struct cache_head *ch;
@@ -593,7 +596,7 @@
}
-struct svc_expkey *
+static struct svc_expkey *
exp_find_key(svc_client *clp, int fsid_type, u32 *fsidv, struct cache_req *reqp)
{
struct svc_expkey key, *ek;
--- linux-2.6.16-rc6-mm1-full/include/linux/sunrpc/cache.h.old 2006-03-13 21:26:34.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/include/linux/sunrpc/cache.h 2006-03-13 21:26:40.000000000 +0100
@@ -163,7 +163,6 @@
kref_put(&h->ref, cd->cache_put);
}
-extern void cache_init(struct cache_head *h);
extern int cache_check(struct cache_detail *detail,
struct cache_head *h, struct cache_req *rqstp);
extern void cache_flush(void);
--- linux-2.6.16-rc6-mm1-full/net/sunrpc/cache.c.old 2006-03-13 21:26:55.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/net/sunrpc/cache.c 2006-03-13 21:27:01.000000000 +0100
@@ -37,7 +37,7 @@
static void cache_defer_req(struct cache_req *req, struct cache_head *item);
static void cache_revisit_request(struct cache_head *item);
-void cache_init(struct cache_head *h)
+static void cache_init(struct cache_head *h)
{
time_t now = get_seconds();
h->next = NULL;
--- linux-2.6.16-rc6-mm1-full/net/sunrpc/sunrpc_syms.c.old 2006-03-13 21:27:10.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/net/sunrpc/sunrpc_syms.c 2006-03-13 21:27:13.000000000 +0100
@@ -105,7 +105,6 @@
EXPORT_SYMBOL(cache_check);
EXPORT_SYMBOL(cache_flush);
EXPORT_SYMBOL(cache_purge);
-EXPORT_SYMBOL(cache_init);
EXPORT_SYMBOL(cache_register);
EXPORT_SYMBOL(cache_unregister);
EXPORT_SYMBOL(qword_add);
next prev parent reply other threads:[~2006-03-13 21:19 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-12 11:10 2.6.16-rc6-mm1 Andrew Morton
2006-03-12 13:16 ` 2.6.16-rc6-mm1 Rafael J. Wysocki
2006-03-12 13:35 ` 2.6.16-rc6-mm1 Sam Ravnborg
2006-03-12 13:49 ` 2.6.16-rc6-mm1 Rafael J. Wysocki
2006-03-12 14:29 ` [PATCH] kbuild: fix genksyms build error Sam Ravnborg
2006-03-12 15:46 ` 2.6.16-rc6-mm1 Benoit Boissinot
2006-03-12 15:48 ` 2.6.16-rc6-mm1 Benoit Boissinot
2006-03-12 15:55 ` 2.6.16-rc6-mm1 Benoit Boissinot
2006-03-12 18:45 ` 2.6.16-rc6-mm1: BUG at fs/sysfs/inode.c:180 Laurent Riffard
2006-03-12 22:55 ` Alexey Dobriyan
2006-03-12 23:33 ` Laurent Riffard
2006-03-12 23:01 ` Andrew Morton
2006-03-13 14:00 ` Maneesh Soni
2006-03-13 17:04 ` Laurent Riffard
2006-03-13 19:22 ` Greg KH
2006-03-14 3:23 ` Maneesh Soni
2006-03-12 21:43 ` BUG: atomic counter underflow [Was: 2.6.16-rc6-mm1] Jiri Slaby
2006-03-13 3:35 ` Ian Kent
2006-03-13 5:33 ` Ian Kent
2006-03-17 16:47 ` Jiri Slaby
2006-03-17 17:47 ` Jiri Slaby
2006-03-19 1:06 ` Jiri Slaby
2006-03-19 1:19 ` Jiri Slaby
2006-03-23 11:44 ` Ian Kent
2006-03-12 21:47 ` 2.6.16-rc6-mm1 Grant Coady
2006-03-13 3:18 ` 2.6.16-rc6-mm1 James Morris
2006-03-13 4:39 ` 2.6.16-rc6-mm1 (NFS tree ... busy inodes ... relatively harmless) Neil Brown
2006-03-13 4:47 ` Andrew Morton
2006-03-13 21:14 ` [-mm patch] sound/pci/ice1712/delta.c: make 2 functions static Adrian Bunk
2006-03-14 11:16 ` Takashi Iwai
2006-03-13 21:16 ` [RFC: -mm patch] remove drivers/message/fusion/mptscsih.c:mptscsih_setDevicePage1Flags() Adrian Bunk
2006-03-13 21:19 ` Adrian Bunk [this message]
2006-03-13 21:21 ` [RFC: -mm patch] remove drivers/scsi/constants.c:scsi_print_req_sense() Adrian Bunk
2006-03-13 21:26 ` [-mm patch] make drivers/net/tg3.c:tg3_request_irq() Adrian Bunk
2006-03-15 1:04 ` David S. Miller
2006-03-13 21:28 ` [-mm patch] dvb/frontends/zl10353.c: make a function static Adrian Bunk
2006-03-15 7:41 ` 2.6.16-rc6-mm1 Nishanth Aravamudan
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=20060313211926.GJ13973@stusta.de \
--to=bunk@stusta.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
--cc=nfs@lists.sourceforge.net \
--cc=trond.myklebust@fys.uio.no \
/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