diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2007-11-08 17:20:34 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2008-02-01 16:42:05 -0500 |
commit | dbf847ecb6318d3a22c6758fe39696d00f39063a (patch) | |
tree | 2b71e776ca98bc94258f3539bd7f0ea53d2733a8 /include/linux/nfsd_idmap.h | |
parent | ffe9386b6e08e7132cb7730025d0ea310e08a182 (diff) |
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>
Diffstat (limited to 'include/linux/nfsd_idmap.h')
-rw-r--r-- | include/linux/nfsd_idmap.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/nfsd_idmap.h b/include/linux/nfsd_idmap.h index e82746fcad14..d4a2ac18bd4c 100644 --- a/include/linux/nfsd_idmap.h +++ b/include/linux/nfsd_idmap.h | |||
@@ -44,11 +44,16 @@ | |||
44 | #define IDMAP_NAMESZ 128 | 44 | #define IDMAP_NAMESZ 128 |
45 | 45 | ||
46 | #ifdef CONFIG_NFSD_V4 | 46 | #ifdef CONFIG_NFSD_V4 |
47 | void nfsd_idmap_init(void); | 47 | int nfsd_idmap_init(void); |
48 | void nfsd_idmap_shutdown(void); | 48 | void nfsd_idmap_shutdown(void); |
49 | #else | 49 | #else |
50 | static inline void nfsd_idmap_init(void) {}; | 50 | static inline int nfsd_idmap_init(void) |
51 | static inline void nfsd_idmap_shutdown(void) {}; | 51 | { |
52 | return 0; | ||
53 | } | ||
54 | static inline void nfsd_idmap_shutdown(void) | ||
55 | { | ||
56 | } | ||
52 | #endif | 57 | #endif |
53 | 58 | ||
54 | int nfsd_map_name_to_uid(struct svc_rqst *, const char *, size_t, __u32 *); | 59 | int nfsd_map_name_to_uid(struct svc_rqst *, const char *, size_t, __u32 *); |