mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 17:11:46 +00:00
knfsd: move nfsv4 slab creation/destruction to module init/exit
We have some slabs that the nfs4 server uses to store state objects. We're currently creating and destroying those slabs whenever the server is brought up or down. That seems excessive; may as well just do that in module initialization and exit. Also add some minor header cleanup. (Thanks to Andrew Morton for that and a compile fix.) Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Acked-by: Neil Brown <neilb@suse.de>
This commit is contained in:
parent
2b47eece1f
commit
e8ff2a8453
4 changed files with 25 additions and 24 deletions
|
@ -153,19 +153,21 @@ extern int nfsd_max_blksize;
|
|||
*/
|
||||
#ifdef CONFIG_NFSD_V4
|
||||
extern unsigned int max_delegations;
|
||||
void nfs4_state_init(void);
|
||||
int nfs4_state_start(void);
|
||||
int nfs4_state_init(void);
|
||||
void nfsd4_free_slabs(void);
|
||||
void nfs4_state_start(void);
|
||||
void nfs4_state_shutdown(void);
|
||||
time_t nfs4_lease_time(void);
|
||||
void nfs4_reset_lease(time_t leasetime);
|
||||
int nfs4_reset_recoverydir(char *recdir);
|
||||
#else
|
||||
static inline void nfs4_state_init(void){};
|
||||
static inline int nfs4_state_start(void){return 0;}
|
||||
static inline void nfs4_state_shutdown(void){}
|
||||
static inline time_t nfs4_lease_time(void){return 0;}
|
||||
static inline void nfs4_reset_lease(time_t leasetime){}
|
||||
static inline int nfs4_reset_recoverydir(char *recdir) {return 0;}
|
||||
static inline int nfs4_state_init(void) { return 0; }
|
||||
static inline void nfsd4_free_slabs(void) { }
|
||||
static inline void nfs4_state_start(void) { }
|
||||
static inline void nfs4_state_shutdown(void) { }
|
||||
static inline time_t nfs4_lease_time(void) { return 0; }
|
||||
static inline void nfs4_reset_lease(time_t leasetime) { }
|
||||
static inline int nfs4_reset_recoverydir(char *recdir) { return 0; }
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue