diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2007-11-08 16:09:59 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2008-02-01 16:42:04 -0500 |
commit | df95a9d4fb91d819d3fb55dd437056df59e7f15e (patch) | |
tree | 9c35b2617a202c029803791c19d55a0483d9d225 /net/sunrpc/cache.c | |
parent | d5c3428b2cb26d605fddc4878f4fcc03c23df89f (diff) |
knfsd: cache unregistration needn't return error
There's really nothing much the caller can do if cache unregistration
fails. And indeed, all any caller does in this case is print an error
and continue. So just return void and move the printk's inside
cache_unregister.
Acked-by: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
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) schedule_delayed_work(&cache_cleaner, 0); } -int cache_unregister(struct cache_detail *cd) +void cache_unregister(struct cache_detail *cd) { cache_purge(cd); spin_lock(&cache_list_lock); @@ -351,7 +351,7 @@ int cache_unregister(struct cache_detail *cd) if (cd->entries || atomic_read(&cd->inuse)) { write_unlock(&cd->hash_lock); spin_unlock(&cache_list_lock); - return -EBUSY; + goto out; } if (current_detail == cd) current_detail = NULL; @@ -373,7 +373,9 @@ int cache_unregister(struct cache_detail *cd) /* module must be being unloaded so its safe to kill the worker */ cancel_delayed_work_sync(&cache_cleaner); } - return 0; + return; +out: + printk(KERN_ERR "nfsd: failed to unregister %s cache\n", cd->name); } /* clean cache tries to find something to clean |