knfsd: allow cache_register to return error on failure

Newer server features such as nfsv4 and gss depend on proc to work, so a
failure to initialize the proc files they need should be treated as
fatal.

Thanks to Andrew Morton for style fix and compile fix in case where
CONFIG_NFSD_V4 is undefined.

Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
This commit is contained in:
J. Bruce Fields
2007-11-08 17:20:34 -05:00
parent ffe9386b6e
commit dbf847ecb6
8 changed files with 75 additions and 26 deletions

View File

@@ -44,11 +44,16 @@
#define IDMAP_NAMESZ 128
#ifdef CONFIG_NFSD_V4
void nfsd_idmap_init(void);
int nfsd_idmap_init(void);
void nfsd_idmap_shutdown(void);
#else
static inline void nfsd_idmap_init(void) {};
static inline void nfsd_idmap_shutdown(void) {};
static inline int nfsd_idmap_init(void)
{
return 0;
}
static inline void nfsd_idmap_shutdown(void)
{
}
#endif
int nfsd_map_name_to_uid(struct svc_rqst *, const char *, size_t, __u32 *);