diff options
-rw-r--r-- | fs/nfsd/export.c | 6 | ||||
-rw-r--r-- | fs/nfsd/nfs4idmap.c | 6 | ||||
-rw-r--r-- | include/linux/sunrpc/cache.h | 2 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/svcauth_gss.c | 6 | ||||
-rw-r--r-- | net/sunrpc/cache.c | 8 | ||||
-rw-r--r-- | net/sunrpc/sunrpc_syms.c | 6 |
6 files changed, 14 insertions, 20 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 66d0aeb32a47..d29b70a28f2b 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c | |||
@@ -1670,10 +1670,8 @@ nfsd_export_shutdown(void) | |||
1670 | 1670 | ||
1671 | exp_writelock(); | 1671 | exp_writelock(); |
1672 | 1672 | ||
1673 | if (cache_unregister(&svc_expkey_cache)) | 1673 | cache_unregister(&svc_expkey_cache); |
1674 | printk(KERN_ERR "nfsd: failed to unregister expkey cache\n"); | 1674 | cache_unregister(&svc_export_cache); |
1675 | if (cache_unregister(&svc_export_cache)) | ||
1676 | printk(KERN_ERR "nfsd: failed to unregister export cache\n"); | ||
1677 | svcauth_unix_purge(); | 1675 | svcauth_unix_purge(); |
1678 | 1676 | ||
1679 | exp_writeunlock(); | 1677 | exp_writeunlock(); |
diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c index 5b56c77c15c5..ef22179c49ad 100644 --- a/fs/nfsd/nfs4idmap.c +++ b/fs/nfsd/nfs4idmap.c | |||
@@ -474,10 +474,8 @@ nfsd_idmap_init(void) | |||
474 | void | 474 | void |
475 | nfsd_idmap_shutdown(void) | 475 | nfsd_idmap_shutdown(void) |
476 | { | 476 | { |
477 | if (cache_unregister(&idtoname_cache)) | 477 | cache_unregister(&idtoname_cache); |
478 | printk(KERN_ERR "nfsd: failed to unregister idtoname cache\n"); | 478 | cache_unregister(&nametoid_cache); |
479 | if (cache_unregister(&nametoid_cache)) | ||
480 | printk(KERN_ERR "nfsd: failed to unregister nametoid cache\n"); | ||
481 | } | 479 | } |
482 | 480 | ||
483 | /* | 481 | /* |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index bd7a6b0a87af..b683b5ddeea9 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -170,7 +170,7 @@ extern void cache_flush(void); | |||
170 | extern void cache_purge(struct cache_detail *detail); | 170 | extern void cache_purge(struct cache_detail *detail); |
171 | #define NEVER (0x7FFFFFFF) | 171 | #define NEVER (0x7FFFFFFF) |
172 | extern void cache_register(struct cache_detail *cd); | 172 | extern void cache_register(struct cache_detail *cd); |
173 | extern int cache_unregister(struct cache_detail *cd); | 173 | extern void cache_unregister(struct cache_detail *cd); |
174 | 174 | ||
175 | extern void qword_add(char **bpp, int *lp, char *str); | 175 | extern void qword_add(char **bpp, int *lp, char *str); |
176 | extern void qword_addhex(char **bpp, int *lp, char *buf, int blen); | 176 | extern void qword_addhex(char **bpp, int *lp, char *buf, int blen); |
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 73940df6c460..d329a12500aa 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c | |||
@@ -1396,9 +1396,7 @@ gss_svc_init(void) | |||
1396 | void | 1396 | void |
1397 | gss_svc_shutdown(void) | 1397 | gss_svc_shutdown(void) |
1398 | { | 1398 | { |
1399 | if (cache_unregister(&rsc_cache)) | 1399 | cache_unregister(&rsc_cache); |
1400 | printk(KERN_ERR "auth_rpcgss: failed to unregister rsc cache\n"); | 1400 | cache_unregister(&rsi_cache); |
1401 | if (cache_unregister(&rsi_cache)) | ||
1402 | printk(KERN_ERR "auth_rpcgss: failed to unregister rsi cache\n"); | ||
1403 | svc_auth_unregister(RPC_AUTH_GSS); | 1401 | svc_auth_unregister(RPC_AUTH_GSS); |
1404 | } | 1402 | } |
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 3b11277d27b1..365586a999ea 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c | |||
@@ -343,7 +343,7 @@ void cache_register(struct cache_detail *cd) | |||
343 | schedule_delayed_work(&cache_cleaner, 0); | 343 | schedule_delayed_work(&cache_cleaner, 0); |
344 | } | 344 | } |
345 | 345 | ||
346 | int cache_unregister(struct cache_detail *cd) | 346 | void cache_unregister(struct cache_detail *cd) |
347 | { | 347 | { |
348 | cache_purge(cd); | 348 | cache_purge(cd); |
349 | spin_lock(&cache_list_lock); | 349 | spin_lock(&cache_list_lock); |
@@ -351,7 +351,7 @@ int cache_unregister(struct cache_detail *cd) | |||
351 | if (cd->entries || atomic_read(&cd->inuse)) { | 351 | if (cd->entries || atomic_read(&cd->inuse)) { |
352 | write_unlock(&cd->hash_lock); | 352 | write_unlock(&cd->hash_lock); |
353 | spin_unlock(&cache_list_lock); | 353 | spin_unlock(&cache_list_lock); |
354 | return -EBUSY; | 354 | goto out; |
355 | } | 355 | } |
356 | if (current_detail == cd) | 356 | if (current_detail == cd) |
357 | current_detail = NULL; | 357 | current_detail = NULL; |
@@ -373,7 +373,9 @@ int cache_unregister(struct cache_detail *cd) | |||
373 | /* module must be being unloaded so its safe to kill the worker */ | 373 | /* module must be being unloaded so its safe to kill the worker */ |
374 | cancel_delayed_work_sync(&cache_cleaner); | 374 | cancel_delayed_work_sync(&cache_cleaner); |
375 | } | 375 | } |
376 | return 0; | 376 | return; |
377 | out: | ||
378 | printk(KERN_ERR "nfsd: failed to unregister %s cache\n", cd->name); | ||
377 | } | 379 | } |
378 | 380 | ||
379 | /* clean cache tries to find something to clean | 381 | /* clean cache tries to find something to clean |
diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c index 1a7e309d008b..ef7dc78e2c7b 100644 --- a/net/sunrpc/sunrpc_syms.c +++ b/net/sunrpc/sunrpc_syms.c | |||
@@ -98,10 +98,8 @@ cleanup_sunrpc(void) | |||
98 | cleanup_socket_xprt(); | 98 | cleanup_socket_xprt(); |
99 | unregister_rpc_pipefs(); | 99 | unregister_rpc_pipefs(); |
100 | rpc_destroy_mempool(); | 100 | rpc_destroy_mempool(); |
101 | if (cache_unregister(&ip_map_cache)) | 101 | cache_unregister(&ip_map_cache); |
102 | printk(KERN_ERR "sunrpc: failed to unregister ip_map cache\n"); | 102 | cache_unregister(&unix_gid_cache); |
103 | if (cache_unregister(&unix_gid_cache)) | ||
104 | printk(KERN_ERR "sunrpc: failed to unregister unix_gid cache\n"); | ||
105 | #ifdef RPC_DEBUG | 103 | #ifdef RPC_DEBUG |
106 | rpc_unregister_sysctl(); | 104 | rpc_unregister_sysctl(); |
107 | #endif | 105 | #endif |