diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2007-11-09 14:10:56 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2008-02-01 16:42:04 -0500 |
commit | d5c3428b2cb26d605fddc4878f4fcc03c23df89f (patch) | |
tree | b476ca0b6709b65044f222912f2fdd2efbdcf297 /include/linux/nfsd/cache.h | |
parent | 26808d3f10b1213bbb6e27d441be40e20ab84611 (diff) |
nfsd: fail module init on reply cache init failure
If the reply cache initialization fails due to a kmalloc failure,
currently we try to soldier on with a reduced (or nonexistant) reply
cache.
Better to just fail immediately: the failure is then much easier to
understand and debug, and it could save us complexity in some later
code. (But actually, it doesn't help currently because the cache is
also turned off in some odd failure cases; we should probably find a
better way to handle those failure cases some day.)
Fix some minor style problems while we're at it, and rename
nfsd_cache_init() to remove the need for a comment describing it.
Acked-by: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'include/linux/nfsd/cache.h')
-rw-r--r-- | include/linux/nfsd/cache.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/nfsd/cache.h b/include/linux/nfsd/cache.h index 007480cd6a60..7b5d784cc858 100644 --- a/include/linux/nfsd/cache.h +++ b/include/linux/nfsd/cache.h | |||
@@ -72,8 +72,8 @@ enum { | |||
72 | */ | 72 | */ |
73 | #define RC_DELAY (HZ/5) | 73 | #define RC_DELAY (HZ/5) |
74 | 74 | ||
75 | void nfsd_cache_init(void); | 75 | int nfsd_reply_cache_init(void); |
76 | void nfsd_cache_shutdown(void); | 76 | void nfsd_reply_cache_shutdown(void); |
77 | int nfsd_cache_lookup(struct svc_rqst *, int); | 77 | int nfsd_cache_lookup(struct svc_rqst *, int); |
78 | void nfsd_cache_update(struct svc_rqst *, int, __be32 *); | 78 | void nfsd_cache_update(struct svc_rqst *, int, __be32 *); |
79 | 79 | ||