NFSD: Using exp_get for export getting
Don't using cache_get besides export.h, using exp_get for export. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
0da22a919d
commit
bf18f163e8
@ -1253,7 +1253,7 @@ static int e_show(struct seq_file *m, void *p)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
cache_get(&exp->h);
|
exp_get(exp);
|
||||||
if (cache_check(cd, &exp->h, NULL))
|
if (cache_check(cd, &exp->h, NULL))
|
||||||
return 0;
|
return 0;
|
||||||
exp_put(exp);
|
exp_put(exp);
|
||||||
|
@ -101,9 +101,10 @@ static inline void exp_put(struct svc_export *exp)
|
|||||||
cache_put(&exp->h, exp->cd);
|
cache_put(&exp->h, exp->cd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void exp_get(struct svc_export *exp)
|
static inline struct svc_export *exp_get(struct svc_export *exp)
|
||||||
{
|
{
|
||||||
cache_get(&exp->h);
|
cache_get(&exp->h);
|
||||||
|
return exp;
|
||||||
}
|
}
|
||||||
struct svc_export * rqst_exp_find(struct svc_rqst *, int, u32 *);
|
struct svc_export * rqst_exp_find(struct svc_rqst *, int, u32 *);
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ fh_dup2(struct svc_fh *dst, struct svc_fh *src)
|
|||||||
fh_put(dst);
|
fh_put(dst);
|
||||||
dget(src->fh_dentry);
|
dget(src->fh_dentry);
|
||||||
if (src->fh_export)
|
if (src->fh_export)
|
||||||
cache_get(&src->fh_export->h);
|
exp_get(src->fh_export);
|
||||||
*dst = *src;
|
*dst = *src;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -918,8 +918,8 @@ nfsd4_secinfo_no_name(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstat
|
|||||||
default:
|
default:
|
||||||
return nfserr_inval;
|
return nfserr_inval;
|
||||||
}
|
}
|
||||||
exp_get(cstate->current_fh.fh_export);
|
|
||||||
sin->sin_exp = cstate->current_fh.fh_export;
|
sin->sin_exp = exp_get(cstate->current_fh.fh_export);
|
||||||
fh_put(&cstate->current_fh);
|
fh_put(&cstate->current_fh);
|
||||||
return nfs_ok;
|
return nfs_ok;
|
||||||
}
|
}
|
||||||
|
@ -539,8 +539,7 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry,
|
|||||||
dentry);
|
dentry);
|
||||||
|
|
||||||
fhp->fh_dentry = dget(dentry); /* our internal copy */
|
fhp->fh_dentry = dget(dentry); /* our internal copy */
|
||||||
fhp->fh_export = exp;
|
fhp->fh_export = exp_get(exp);
|
||||||
cache_get(&exp->h);
|
|
||||||
|
|
||||||
if (fhp->fh_handle.fh_version == 0xca) {
|
if (fhp->fh_handle.fh_version == 0xca) {
|
||||||
/* old style filehandle please */
|
/* old style filehandle please */
|
||||||
|
@ -189,8 +189,7 @@ nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp,
|
|||||||
dprintk("nfsd: nfsd_lookup(fh %s, %.*s)\n", SVCFH_fmt(fhp), len,name);
|
dprintk("nfsd: nfsd_lookup(fh %s, %.*s)\n", SVCFH_fmt(fhp), len,name);
|
||||||
|
|
||||||
dparent = fhp->fh_dentry;
|
dparent = fhp->fh_dentry;
|
||||||
exp = fhp->fh_export;
|
exp = exp_get(fhp->fh_export);
|
||||||
exp_get(exp);
|
|
||||||
|
|
||||||
/* Lookup the name, but don't follow links */
|
/* Lookup the name, but don't follow links */
|
||||||
if (isdotent(name, len)) {
|
if (isdotent(name, len)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user