freebsd vcache splitting fallout

fix the vcache splitting to work again

Change-Id: I8833fc6655dcb79329835664d38f5330645b45f8
Reviewed-on: http://gerrit.openafs.org/1904
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Derrick Brashear 2010-05-04 11:39:19 -04:00
parent 1e69ec9cfe
commit 98d20e250d
2 changed files with 7 additions and 4 deletions

View File

@ -30,10 +30,10 @@ osi_TryEvictVCache(struct vcache *avc, int *slept) {
/* vgone() is correct, but v_usecount is assumed not
* to be 0, and I suspect that currently our usage ensures that
* in fact it will */
if (vrefcnt(AFSTOV(tvc)) < 1) {
vref(AFSTOV(tvc));
if (vrefcnt(AFSTOV(avc)) < 1) {
vref(AFSTOV(avc));
}
vn_lock(AFSTOV(tvc), LK_EXCLUSIVE | LK_RETRY); /* !glocked */
vn_lock(AFSTOV(avc), LK_EXCLUSIVE | LK_RETRY); /* !glocked */
#endif
vgone(AFSTOV(avc));
@ -97,7 +97,7 @@ osi_AttachVnode(struct vcache *avc, int seq) {
* mutual exclusion (an Embryonic flag would suffice).
* -GAW */
afs_warn("afs_NewVCache: lost the race\n");
return (avc);
return;
}
avc->v = vp;
avc->v->v_data = avc;

View File

@ -865,6 +865,9 @@ afs_NewVCache_int(struct VenusFid *afid, struct server *serverp, int seq)
VREFCOUNT_SET(tvc, 1); /* us */
#endif
#if defined (AFS_FBSD_ENV)
if (tvc->f.states & CVInit)
#endif
afs_PostPopulateVCache(tvc, afid, seq);
return tvc;