afs_osi_Wakeup(&afs_initState);
afs_PutVolume(tvp, READ_LOCK);
}
-#ifdef AFS_DEC_ENV
-/* This is to make sure that we update the root gnode */
-/* every time root volume gets released */
- {
- struct gnode *rootgp;
- struct mount *mp;
- int code;
-
- /* Only do this if afs_globalVFS is properly set due to race conditions
- * this routine could be called before the gfs_mount is performed!
- * Furthermore, afs_root (called below) *waits* until
- * initState >= 200, so we don't try this until we've gotten
- * at least that far */
- if (afs_globalVFS && afs_initState >= 200) {
- if (code = afs_root(afs_globalVFS, &rootgp))
- return code;
- mp = (struct mount *)afs_globalVFS->vfs_data;
- mp->m_rootgp = gget(mp, 0, 0, (char *)rootgp);
- afs_unlock(mp->m_rootgp); /* unlock basic gnode */
- afs_vrele(VTOAFS(rootgp)); /* zap afs_root's vnode hold */
- }
- }
-#endif
if (afs_rootFid.Fid.Volume)
return 0;
else
if (!tvn || !IsAfsVnode(tvn)) {
/* release it and give up */
if (tvn) {
-#ifdef AFS_DEC_ENV
- grele(tvn);
-#else
#ifdef AFS_LINUX22_ENV
dput(dp);
#else
AFS_RELE(tvn);
#endif
-#endif
}
return;
}
-#ifdef AFS_DEC_ENV
- tvc = VTOAFS(afs_gntovn(tvn));
-#else
tvc = VTOAFS(tvn);
-#endif
/* here we know its an afs vnode, so we can get the data for the chunk */
tdc = afs_GetDCache(tvc, ab->size_parm[0], &treq, &offset, &len, 1);
if (tdc) {
afs_PutDCache(tdc);
}
-#ifdef AFS_DEC_ENV
- grele(tvn);
-#else
#ifdef AFS_LINUX22_ENV
dput(dp);
#else
AFS_RELE(tvn);
#endif
-#endif
}
/* size_parm 0 to the fetch is the chunk number,
tb->cred = acred;
crhold(tb->cred);
if (avc) {
-#ifdef AFS_DEC_ENV
- avc->vrefCount++;
-#else
VN_HOLD(AFSTOV(avc));
-#endif
}
tb->refCount = ause + 1;
tb->size_parm[0] = asparm0;
else
panic("background bop");
if (tb->vc) {
-#ifdef AFS_DEC_ENV
- tb->vc->vrefCount--; /* fix up reference count */
-#else
AFS_RELE(AFSTOV(tb->vc)); /* MUST call vnode layer or could lose vnodes */
-#endif
tb->vc = NULL;
}
if (tb->cred) {