aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/export.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/export.c')
-rw-r--r--fs/nfsd/export.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 66d0aeb32a47..79b4bf812960 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -1357,8 +1357,6 @@ exp_pseudoroot(struct svc_rqst *rqstp, struct svc_fh *fhp)
1357 mk_fsid(FSID_NUM, fsidv, 0, 0, 0, NULL); 1357 mk_fsid(FSID_NUM, fsidv, 0, 0, 0, NULL);
1358 1358
1359 exp = rqst_exp_find(rqstp, FSID_NUM, fsidv); 1359 exp = rqst_exp_find(rqstp, FSID_NUM, fsidv);
1360 if (PTR_ERR(exp) == -ENOENT)
1361 return nfserr_perm;
1362 if (IS_ERR(exp)) 1360 if (IS_ERR(exp))
1363 return nfserrno(PTR_ERR(exp)); 1361 return nfserrno(PTR_ERR(exp));
1364 rv = fh_compose(fhp, exp, exp->ex_dentry, NULL); 1362 rv = fh_compose(fhp, exp, exp->ex_dentry, NULL);
@@ -1637,13 +1635,19 @@ exp_verify_string(char *cp, int max)
1637/* 1635/*
1638 * Initialize the exports module. 1636 * Initialize the exports module.
1639 */ 1637 */
1640void 1638int
1641nfsd_export_init(void) 1639nfsd_export_init(void)
1642{ 1640{
1641 int rv;
1643 dprintk("nfsd: initializing export module.\n"); 1642 dprintk("nfsd: initializing export module.\n");
1644 1643
1645 cache_register(&svc_export_cache); 1644 rv = cache_register(&svc_export_cache);
1646 cache_register(&svc_expkey_cache); 1645 if (rv)
1646 return rv;
1647 rv = cache_register(&svc_expkey_cache);
1648 if (rv)
1649 cache_unregister(&svc_export_cache);
1650 return rv;
1647 1651
1648} 1652}
1649 1653
@@ -1670,10 +1674,8 @@ nfsd_export_shutdown(void)
1670 1674
1671 exp_writelock(); 1675 exp_writelock();
1672 1676
1673 if (cache_unregister(&svc_expkey_cache)) 1677 cache_unregister(&svc_expkey_cache);
1674 printk(KERN_ERR "nfsd: failed to unregister expkey cache\n"); 1678 cache_unregister(&svc_export_cache);
1675 if (cache_unregister(&svc_export_cache))
1676 printk(KERN_ERR "nfsd: failed to unregister export cache\n");
1677 svcauth_unix_purge(); 1679 svcauth_unix_purge();
1678 1680
1679 exp_writeunlock(); 1681 exp_writeunlock();