diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-02-20 15:49:00 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2008-04-23 16:13:39 -0400 |
commit | a254b246ee238ab90e7b3fae1f76875b608b2213 (patch) | |
tree | 1e4c35e1225b91693694d0384ef6f1e0e8500e4d | |
parent | d8421202121ce74daf4625ca9d1d825bbd7ce66a (diff) |
nfsd: fix sparse warnings
Add extern to nfsd/nfsd.h
fs/nfsd/nfssvc.c:146:5: warning: symbol 'nfsd_nrthreads' was not declared. Should it be static?
fs/nfsd/nfssvc.c:261:5: warning: symbol 'nfsd_nrpools' was not declared. Should it be static?
fs/nfsd/nfssvc.c:269:5: warning: symbol 'nfsd_get_nrthreads' was not declared. Should it be static?
fs/nfsd/nfssvc.c:281:5: warning: symbol 'nfsd_set_nrthreads' was not declared. Should it be static?
fs/nfsd/export.c:1534:23: warning: symbol 'nfs_exports_op' was not declared. Should it be static?
Add include of auth.h
fs/nfsd/auth.c:27:5: warning: symbol 'nfsd_setuser' was not declared. Should it be static?
Make static, move forward declaration closer to where it's needed.
fs/nfsd/nfs4state.c:1877:1: warning: symbol 'laundromat_main' was not declared. Should it be static?
Make static, forward declaration was already marked static.
fs/nfsd/nfs4idmap.c:206:1: warning: symbol 'idtoname_parse' was not declared. Should it be static?
fs/nfsd/vfs.c:1156:1: warning: symbol 'nfsd_create_setattr' was not declared. Should it be static?
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
-rw-r--r-- | fs/nfsd/auth.c | 1 | ||||
-rw-r--r-- | fs/nfsd/nfs4idmap.c | 2 | ||||
-rw-r--r-- | fs/nfsd/nfs4state.c | 10 | ||||
-rw-r--r-- | fs/nfsd/nfsctl.c | 7 | ||||
-rw-r--r-- | include/linux/nfsd/nfsd.h | 8 |
5 files changed, 15 insertions, 13 deletions
diff --git a/fs/nfsd/auth.c b/fs/nfsd/auth.c index d13403e33622..294992e9bf69 100644 --- a/fs/nfsd/auth.c +++ b/fs/nfsd/auth.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/sunrpc/svcauth.h> | 10 | #include <linux/sunrpc/svcauth.h> |
11 | #include <linux/nfsd/nfsd.h> | 11 | #include <linux/nfsd/nfsd.h> |
12 | #include <linux/nfsd/export.h> | 12 | #include <linux/nfsd/export.h> |
13 | #include "auth.h" | ||
13 | 14 | ||
14 | int nfsexp_flags(struct svc_rqst *rqstp, struct svc_export *exp) | 15 | int nfsexp_flags(struct svc_rqst *rqstp, struct svc_export *exp) |
15 | { | 16 | { |
diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c index 996bd88b75ba..5b398421b051 100644 --- a/fs/nfsd/nfs4idmap.c +++ b/fs/nfsd/nfs4idmap.c | |||
@@ -202,7 +202,7 @@ static struct cache_detail idtoname_cache = { | |||
202 | .alloc = ent_alloc, | 202 | .alloc = ent_alloc, |
203 | }; | 203 | }; |
204 | 204 | ||
205 | int | 205 | static int |
206 | idtoname_parse(struct cache_detail *cd, char *buf, int buflen) | 206 | idtoname_parse(struct cache_detail *cd, char *buf, int buflen) |
207 | { | 207 | { |
208 | struct ent ent, *res; | 208 | struct ent ent, *res; |
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index a40d1ec52fea..8235d315cd62 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -1763,10 +1763,6 @@ out: | |||
1763 | return status; | 1763 | return status; |
1764 | } | 1764 | } |
1765 | 1765 | ||
1766 | static struct workqueue_struct *laundry_wq; | ||
1767 | static void laundromat_main(struct work_struct *); | ||
1768 | static DECLARE_DELAYED_WORK(laundromat_work, laundromat_main); | ||
1769 | |||
1770 | __be32 | 1766 | __be32 |
1771 | nfsd4_renew(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | 1767 | nfsd4_renew(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, |
1772 | clientid_t *clid) | 1768 | clientid_t *clid) |
@@ -1874,7 +1870,11 @@ nfs4_laundromat(void) | |||
1874 | return clientid_val; | 1870 | return clientid_val; |
1875 | } | 1871 | } |
1876 | 1872 | ||
1877 | void | 1873 | static struct workqueue_struct *laundry_wq; |
1874 | static void laundromat_main(struct work_struct *); | ||
1875 | static DECLARE_DELAYED_WORK(laundromat_work, laundromat_main); | ||
1876 | |||
1877 | static void | ||
1878 | laundromat_main(struct work_struct *not_used) | 1878 | laundromat_main(struct work_struct *not_used) |
1879 | { | 1879 | { |
1880 | time_t t; | 1880 | time_t t; |
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 9f038a4a148e..613bcb8171a5 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c | |||
@@ -150,7 +150,6 @@ static const struct file_operations transaction_ops = { | |||
150 | .release = simple_transaction_release, | 150 | .release = simple_transaction_release, |
151 | }; | 151 | }; |
152 | 152 | ||
153 | extern struct seq_operations nfs_exports_op; | ||
154 | static int exports_open(struct inode *inode, struct file *file) | 153 | static int exports_open(struct inode *inode, struct file *file) |
155 | { | 154 | { |
156 | return seq_open(file, &nfs_exports_op); | 155 | return seq_open(file, &nfs_exports_op); |
@@ -358,8 +357,6 @@ static ssize_t write_filehandle(struct file *file, char *buf, size_t size) | |||
358 | return mesg - buf; | 357 | return mesg - buf; |
359 | } | 358 | } |
360 | 359 | ||
361 | extern int nfsd_nrthreads(void); | ||
362 | |||
363 | static ssize_t write_threads(struct file *file, char *buf, size_t size) | 360 | static ssize_t write_threads(struct file *file, char *buf, size_t size) |
364 | { | 361 | { |
365 | /* if size > 0, look for a number of threads and call nfsd_svc | 362 | /* if size > 0, look for a number of threads and call nfsd_svc |
@@ -382,10 +379,6 @@ static ssize_t write_threads(struct file *file, char *buf, size_t size) | |||
382 | return strlen(buf); | 379 | return strlen(buf); |
383 | } | 380 | } |
384 | 381 | ||
385 | extern int nfsd_nrpools(void); | ||
386 | extern int nfsd_get_nrthreads(int n, int *); | ||
387 | extern int nfsd_set_nrthreads(int n, int *); | ||
388 | |||
389 | static ssize_t write_pool_threads(struct file *file, char *buf, size_t size) | 382 | static ssize_t write_pool_threads(struct file *file, char *buf, size_t size) |
390 | { | 383 | { |
391 | /* if size > 0, look for an array of number of threads per node | 384 | /* if size > 0, look for an array of number of threads per node |
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index 8caf4c4f64e6..f4de14d903a6 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h | |||
@@ -56,12 +56,20 @@ extern struct svc_program nfsd_program; | |||
56 | extern struct svc_version nfsd_version2, nfsd_version3, | 56 | extern struct svc_version nfsd_version2, nfsd_version3, |
57 | nfsd_version4; | 57 | nfsd_version4; |
58 | extern struct svc_serv *nfsd_serv; | 58 | extern struct svc_serv *nfsd_serv; |
59 | |||
60 | extern struct seq_operations nfs_exports_op; | ||
61 | |||
59 | /* | 62 | /* |
60 | * Function prototypes. | 63 | * Function prototypes. |
61 | */ | 64 | */ |
62 | int nfsd_svc(unsigned short port, int nrservs); | 65 | int nfsd_svc(unsigned short port, int nrservs); |
63 | int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp); | 66 | int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp); |
64 | 67 | ||
68 | int nfsd_nrthreads(void); | ||
69 | int nfsd_nrpools(void); | ||
70 | int nfsd_get_nrthreads(int n, int *); | ||
71 | int nfsd_set_nrthreads(int n, int *); | ||
72 | |||
65 | /* nfsd/vfs.c */ | 73 | /* nfsd/vfs.c */ |
66 | int fh_lock_parent(struct svc_fh *, struct dentry *); | 74 | int fh_lock_parent(struct svc_fh *, struct dentry *); |
67 | int nfsd_racache_init(int); | 75 | int nfsd_racache_init(int); |