aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth_gss
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2007-11-08 17:20:34 -0500
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-02-01 16:42:05 -0500
commitdbf847ecb6318d3a22c6758fe39696d00f39063a (patch)
tree2b71e776ca98bc94258f3539bd7f0ea53d2733a8 /net/sunrpc/auth_gss
parentffe9386b6e08e7132cb7730025d0ea310e08a182 (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 'net/sunrpc/auth_gss')
-rw-r--r--net/sunrpc/auth_gss/svcauth_gss.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c
index d329a12500aa..aa790bb4f7a1 100644
--- a/net/sunrpc/auth_gss/svcauth_gss.c
+++ b/net/sunrpc/auth_gss/svcauth_gss.c
@@ -1386,10 +1386,19 @@ int
1386gss_svc_init(void) 1386gss_svc_init(void)
1387{ 1387{
1388 int rv = svc_auth_register(RPC_AUTH_GSS, &svcauthops_gss); 1388 int rv = svc_auth_register(RPC_AUTH_GSS, &svcauthops_gss);
1389 if (rv == 0) { 1389 if (rv)
1390 cache_register(&rsc_cache); 1390 return rv;
1391 cache_register(&rsi_cache); 1391 rv = cache_register(&rsc_cache);
1392 } 1392 if (rv)
1393 goto out1;
1394 rv = cache_register(&rsi_cache);
1395 if (rv)
1396 goto out2;
1397 return 0;
1398out2:
1399 cache_unregister(&rsc_cache);
1400out1:
1401 svc_auth_unregister(RPC_AUTH_GSS);
1393 return rv; 1402 return rv;
1394} 1403}
1395 1404