ek = svc_expkey_lookup(&key, 2);
if (ek)
expkey_put(&ek->h, &svc_expkey_cache);
- svc_export_put(&exp->h, &svc_export_cache);
+ exp_put(exp);
err = 0;
out_nd:
path_release(&nd);
struct svc_export new;
struct svc_expkey *fsid_key = NULL;
struct nameidata nd;
- struct inode *inode = NULL;
int err;
/* Consistency check */
err = path_lookup(nxp->ex_path, 0, &nd);
if (err)
goto out_unlock;
- inode = nd.dentry->d_inode;
err = -EINVAL;
exp = exp_get_by_name(clp, nd.mnt, nd.dentry, NULL);
fsid_key->ek_export != exp)
goto finish;
- if (exp != NULL) {
+ if (exp) {
/* just a flags/id/fsid update */
exp_fsid_unhash(exp);
goto finish;
}
- err = check_export(inode, nxp->ex_flags);
+ err = check_export(nd.dentry->d_inode, nxp->ex_flags);
if (err) goto finish;
err = -ENOMEM;
err = 0;
memcpy(f, &fh.fh_handle, sizeof(struct knfsd_fh));
fh_put(&fh);
-
+ exp_put(exp);
out:
path_release(&nd);
return err;