X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=fs%2Fnfsd%2Fexport.c;h=9dc036f1835614e3c2505abad50496071cf8b0b2;hb=aef8755711a28bb0ecde7780ae6613fcb62cf6f7;hp=8a6f7c924c7597d0e851a84f45ae479714856f33;hpb=98c1fc934c097d84dc30c639e9bdb0b992ef53e2;p=linux-2.6-omap-h63xx.git diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 8a6f7c924c7..9dc036f1835 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -35,6 +35,7 @@ #include #include #include +#include #define NFSDDBG_FACILITY NFSDDBG_EXPORT @@ -1022,7 +1023,7 @@ exp_export(struct nfsctl_export *nxp) /* Look up the dentry */ err = path_lookup(nxp->ex_path, 0, &nd); if (err) - goto out_unlock; + goto out_put_clp; err = -EINVAL; exp = exp_get_by_name(clp, nd.path.mnt, nd.path.dentry, NULL); @@ -1089,9 +1090,9 @@ finish: exp_put(exp); if (fsid_key && !IS_ERR(fsid_key)) cache_put(&fsid_key->h, &svc_expkey_cache); - if (clp) - auth_domain_put(clp); path_put(&nd.path); +out_put_clp: + auth_domain_put(clp); out_unlock: exp_writeunlock(); out: @@ -1548,6 +1549,7 @@ exp_addclient(struct nfsctl_client *ncp) { struct auth_domain *dom; int i, err; + struct in6_addr addr6; /* First, consistency check. */ err = -EINVAL; @@ -1566,9 +1568,10 @@ exp_addclient(struct nfsctl_client *ncp) goto out_unlock; /* Insert client into hashtable. */ - for (i = 0; i < ncp->cl_naddr; i++) - auth_unix_add_addr(ncp->cl_addrlist[i], dom); - + for (i = 0; i < ncp->cl_naddr; i++) { + ipv6_addr_set_v4mapped(ncp->cl_addrlist[i].s_addr, &addr6); + auth_unix_add_addr(&addr6, dom); + } auth_unix_forget_old(dom); auth_domain_put(dom);