nfsd: fail module init on reply cache init failure
authorJ. Bruce Fields <bfields@citi.umich.edu>
Fri, 9 Nov 2007 19:10:56 +0000 (14:10 -0500)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Fri, 1 Feb 2008 21:42:04 +0000 (16:42 -0500)
commitd5c3428b2cb26d605fddc4878f4fcc03c23df89f
treeb476ca0b6709b65044f222912f2fdd2efbdcf297
parent26808d3f10b1213bbb6e27d441be40e20ab84611
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>
fs/nfsd/nfscache.c
fs/nfsd/nfsctl.c
include/linux/nfsd/cache.h