diff options
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 2b20eb8589a0..09573b9f76c7 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -1021,7 +1021,7 @@ nfsd4_free_slab(struct kmem_cache **slab) | |||
1021 | *slab = NULL; | 1021 | *slab = NULL; |
1022 | } | 1022 | } |
1023 | 1023 | ||
1024 | static void | 1024 | void |
1025 | nfsd4_free_slabs(void) | 1025 | nfsd4_free_slabs(void) |
1026 | { | 1026 | { |
1027 | nfsd4_free_slab(&stateowner_slab); | 1027 | nfsd4_free_slab(&stateowner_slab); |
@@ -3152,11 +3152,14 @@ nfs4_check_open_reclaim(clientid_t *clid) | |||
3152 | 3152 | ||
3153 | /* initialization to perform at module load time: */ | 3153 | /* initialization to perform at module load time: */ |
3154 | 3154 | ||
3155 | void | 3155 | int |
3156 | nfs4_state_init(void) | 3156 | nfs4_state_init(void) |
3157 | { | 3157 | { |
3158 | int i; | 3158 | int i, status; |
3159 | 3159 | ||
3160 | status = nfsd4_init_slabs(); | ||
3161 | if (status) | ||
3162 | return status; | ||
3160 | for (i = 0; i < CLIENT_HASH_SIZE; i++) { | 3163 | for (i = 0; i < CLIENT_HASH_SIZE; i++) { |
3161 | INIT_LIST_HEAD(&conf_id_hashtbl[i]); | 3164 | INIT_LIST_HEAD(&conf_id_hashtbl[i]); |
3162 | INIT_LIST_HEAD(&conf_str_hashtbl[i]); | 3165 | INIT_LIST_HEAD(&conf_str_hashtbl[i]); |
@@ -3185,6 +3188,7 @@ nfs4_state_init(void) | |||
3185 | for (i = 0; i < CLIENT_HASH_SIZE; i++) | 3188 | for (i = 0; i < CLIENT_HASH_SIZE; i++) |
3186 | INIT_LIST_HEAD(&reclaim_str_hashtbl[i]); | 3189 | INIT_LIST_HEAD(&reclaim_str_hashtbl[i]); |
3187 | reclaim_str_hashtbl_size = 0; | 3190 | reclaim_str_hashtbl_size = 0; |
3191 | return 0; | ||
3188 | } | 3192 | } |
3189 | 3193 | ||
3190 | static void | 3194 | static void |
@@ -3245,20 +3249,15 @@ __nfs4_state_start(void) | |||
3245 | set_max_delegations(); | 3249 | set_max_delegations(); |
3246 | } | 3250 | } |
3247 | 3251 | ||
3248 | int | 3252 | void |
3249 | nfs4_state_start(void) | 3253 | nfs4_state_start(void) |
3250 | { | 3254 | { |
3251 | int status; | ||
3252 | |||
3253 | if (nfs4_init) | 3255 | if (nfs4_init) |
3254 | return 0; | 3256 | return; |
3255 | status = nfsd4_init_slabs(); | ||
3256 | if (status) | ||
3257 | return status; | ||
3258 | nfsd4_load_reboot_recovery_data(); | 3257 | nfsd4_load_reboot_recovery_data(); |
3259 | __nfs4_state_start(); | 3258 | __nfs4_state_start(); |
3260 | nfs4_init = 1; | 3259 | nfs4_init = 1; |
3261 | return 0; | 3260 | return; |
3262 | } | 3261 | } |
3263 | 3262 | ||
3264 | int | 3263 | int |
@@ -3316,7 +3315,6 @@ nfs4_state_shutdown(void) | |||
3316 | nfs4_lock_state(); | 3315 | nfs4_lock_state(); |
3317 | nfs4_release_reclaim(); | 3316 | nfs4_release_reclaim(); |
3318 | __nfs4_state_shutdown(); | 3317 | __nfs4_state_shutdown(); |
3319 | nfsd4_free_slabs(); | ||
3320 | nfs4_unlock_state(); | 3318 | nfs4_unlock_state(); |
3321 | } | 3319 | } |
3322 | 3320 | ||