diff options
Diffstat (limited to 'net/sunrpc/cache.c')
-rw-r--r-- | net/sunrpc/cache.c | 8 |
1 files changed, 5 insertions, 3 deletions
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 |