Commit dd074e20 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] nfsd: global/static cleanups for nfsd

The patch below contains the following cleanups:
- make some needlessly global code static
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c59e02e1
...@@ -79,9 +79,9 @@ void expkey_put(struct cache_head *item, struct cache_detail *cd) ...@@ -79,9 +79,9 @@ void expkey_put(struct cache_head *item, struct cache_detail *cd)
} }
} }
void expkey_request(struct cache_detail *cd, static void expkey_request(struct cache_detail *cd,
struct cache_head *h, struct cache_head *h,
char **bpp, int *blen) char **bpp, int *blen)
{ {
/* client fsidtype \xfsid */ /* client fsidtype \xfsid */
struct svc_expkey *ek = container_of(h, struct svc_expkey, h); struct svc_expkey *ek = container_of(h, struct svc_expkey, h);
...@@ -95,7 +95,7 @@ void expkey_request(struct cache_detail *cd, ...@@ -95,7 +95,7 @@ void expkey_request(struct cache_detail *cd,
} }
static struct svc_expkey *svc_expkey_lookup(struct svc_expkey *, int); static struct svc_expkey *svc_expkey_lookup(struct svc_expkey *, int);
int expkey_parse(struct cache_detail *cd, char *mesg, int mlen) static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
{ {
/* client fsidtype fsid [path] */ /* client fsidtype fsid [path] */
char *buf; char *buf;
...@@ -284,9 +284,9 @@ void svc_export_put(struct cache_head *item, struct cache_detail *cd) ...@@ -284,9 +284,9 @@ void svc_export_put(struct cache_head *item, struct cache_detail *cd)
} }
} }
void svc_export_request(struct cache_detail *cd, static void svc_export_request(struct cache_detail *cd,
struct cache_head *h, struct cache_head *h,
char **bpp, int *blen) char **bpp, int *blen)
{ {
/* client path */ /* client path */
struct svc_export *exp = container_of(h, struct svc_export, h); struct svc_export *exp = container_of(h, struct svc_export, h);
...@@ -340,7 +340,7 @@ static int check_export(struct inode *inode, int flags) ...@@ -340,7 +340,7 @@ static int check_export(struct inode *inode, int flags)
} }
int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen) static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen)
{ {
/* client path expiry [flags anonuid anongid fsid] */ /* client path expiry [flags anonuid anongid fsid] */
char *buf; char *buf;
...@@ -510,8 +510,8 @@ exp_find_key(svc_client *clp, int fsid_type, u32 *fsidv, struct cache_req *reqp) ...@@ -510,8 +510,8 @@ exp_find_key(svc_client *clp, int fsid_type, u32 *fsidv, struct cache_req *reqp)
return ek; return ek;
} }
int exp_set_key(svc_client *clp, int fsid_type, u32 *fsidv, static int exp_set_key(svc_client *clp, int fsid_type, u32 *fsidv,
struct svc_export *exp) struct svc_export *exp)
{ {
struct svc_expkey key, *ek; struct svc_expkey key, *ek;
...@@ -999,7 +999,7 @@ static void e_stop(struct seq_file *m, void *p) ...@@ -999,7 +999,7 @@ static void e_stop(struct seq_file *m, void *p)
exp_readunlock(); exp_readunlock();
} }
struct flags { static struct flags {
int flag; int flag;
char *name[2]; char *name[2];
} expflags[] = { } expflags[] = {
......
...@@ -60,7 +60,7 @@ nlm_fclose(struct file *filp) ...@@ -60,7 +60,7 @@ nlm_fclose(struct file *filp)
fput(filp); fput(filp);
} }
struct nlmsvc_binding nfsd_nlm_ops = { static struct nlmsvc_binding nfsd_nlm_ops = {
.fopen = nlm_fopen, /* open file for locking */ .fopen = nlm_fopen, /* open file for locking */
.fclose = nlm_fclose, /* close file */ .fclose = nlm_fclose, /* close file */
}; };
......
...@@ -41,7 +41,7 @@ extern struct export_operations export_op_default; ...@@ -41,7 +41,7 @@ extern struct export_operations export_op_default;
* if not, require that we can walk up to exp->ex_dentry * if not, require that we can walk up to exp->ex_dentry
* doing some checks on the 'x' bits * doing some checks on the 'x' bits
*/ */
int nfsd_acceptable(void *expv, struct dentry *dentry) static int nfsd_acceptable(void *expv, struct dentry *dentry)
{ {
struct svc_export *exp = expv; struct svc_export *exp = expv;
int rv; int rv;
...@@ -280,8 +280,8 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access) ...@@ -280,8 +280,8 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access)
* an inode. In this case a call to fh_update should be made * an inode. In this case a call to fh_update should be made
* before the fh goes out on the wire ... * before the fh goes out on the wire ...
*/ */
inline int _fh_update(struct dentry *dentry, struct svc_export *exp, static inline int _fh_update(struct dentry *dentry, struct svc_export *exp,
__u32 *datap, int *maxsize) __u32 *datap, int *maxsize)
{ {
struct export_operations *nop = exp->ex_mnt->mnt_sb->s_export_op; struct export_operations *nop = exp->ex_mnt->mnt_sb->s_export_op;
...@@ -297,8 +297,9 @@ inline int _fh_update(struct dentry *dentry, struct svc_export *exp, ...@@ -297,8 +297,9 @@ inline int _fh_update(struct dentry *dentry, struct svc_export *exp,
/* /*
* for composing old style file handles * for composing old style file handles
*/ */
inline void _fh_update_old(struct dentry *dentry, struct svc_export *exp, static inline void _fh_update_old(struct dentry *dentry,
struct knfsd_fh *fh) struct svc_export *exp,
struct knfsd_fh *fh)
{ {
fh->ofh_ino = ino_t_to_u32(dentry->d_inode->i_ino); fh->ofh_ino = ino_t_to_u32(dentry->d_inode->i_ino);
fh->ofh_generation = dentry->d_inode->i_generation; fh->ofh_generation = dentry->d_inode->i_generation;
......
...@@ -60,7 +60,7 @@ struct nfsd_list { ...@@ -60,7 +60,7 @@ struct nfsd_list {
struct list_head list; struct list_head list;
struct task_struct *task; struct task_struct *task;
}; };
struct list_head nfsd_list = LIST_HEAD_INIT(nfsd_list); static struct list_head nfsd_list = LIST_HEAD_INIT(nfsd_list);
/* /*
* Maximum number of nfsd processes * Maximum number of nfsd processes
......
...@@ -707,8 +707,8 @@ nfsd_close(struct file *filp) ...@@ -707,8 +707,8 @@ nfsd_close(struct file *filp)
* As this calls fsync (not fdatasync) there is no need for a write_inode * As this calls fsync (not fdatasync) there is no need for a write_inode
* after it. * after it.
*/ */
inline void nfsd_dosync(struct file *filp, struct dentry *dp, static inline void nfsd_dosync(struct file *filp, struct dentry *dp,
struct file_operations *fop) struct file_operations *fop)
{ {
struct inode *inode = dp->d_inode; struct inode *inode = dp->d_inode;
int (*fsync) (struct file *, struct dentry *, int); int (*fsync) (struct file *, struct dentry *, int);
...@@ -720,7 +720,7 @@ inline void nfsd_dosync(struct file *filp, struct dentry *dp, ...@@ -720,7 +720,7 @@ inline void nfsd_dosync(struct file *filp, struct dentry *dp,
} }
void static void
nfsd_sync(struct file *filp) nfsd_sync(struct file *filp)
{ {
struct inode *inode = filp->f_dentry->d_inode; struct inode *inode = filp->f_dentry->d_inode;
...@@ -730,7 +730,7 @@ nfsd_sync(struct file *filp) ...@@ -730,7 +730,7 @@ nfsd_sync(struct file *filp)
up(&inode->i_sem); up(&inode->i_sem);
} }
void static void
nfsd_sync_dir(struct dentry *dp) nfsd_sync_dir(struct dentry *dp)
{ {
nfsd_dosync(NULL, dp, dp->d_inode->i_fop); nfsd_dosync(NULL, dp, dp->d_inode->i_fop);
......
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