From cea3bf909ab4b0807ef9f7d93235b4daeb1290dc Mon Sep 17 00:00:00 2001 From: Ben Kaduk Date: Mon, 17 May 2010 00:22:32 -0400 Subject: [PATCH] Enable PutVCache for FBSD80 and higher Matt's patches in a123bd8ccd brought in support for FBSD 7.0, but also disabled several calls to afs_PutVCache() for FBSD80 and higher. Matt says that that patch was focused on 7.0, so the 8.0-related bits may not be relevant. I have run with the PutVCache calls enabled, and if anything, my system seems more stable with them. Change-Id: I8d906848e977d4974e4dcdc151964bb2ac3116b6 Reviewed-on: http://gerrit.openafs.org/1969 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear --- src/afs/FBSD/osi_vfsops.c | 2 -- src/afs/VNOPS/afs_vnop_lookup.c | 10 ---------- 2 files changed, 12 deletions(-) diff --git a/src/afs/FBSD/osi_vfsops.c b/src/afs/FBSD/osi_vfsops.c index 82875cf..95c5ace 100644 --- a/src/afs/FBSD/osi_vfsops.c +++ b/src/afs/FBSD/osi_vfsops.c @@ -205,13 +205,11 @@ afs_root(struct mount *mp, struct vnode **vpp) error = 0; } else { tryagain: -#ifndef AFS_FBSD80_ENV if (afs_globalVp) { afs_PutVCache(afs_globalVp); /* vrele() needed here or not? */ afs_globalVp = NULL; } -#endif if (!(error = afs_InitReq(&treq, cr)) && !(error = afs_CheckInit())) { tvp = afs_GetVCache(&afs_rootFid, &treq, NULL, NULL); /* we really want this to stay around */ diff --git a/src/afs/VNOPS/afs_vnop_lookup.c b/src/afs/VNOPS/afs_vnop_lookup.c index 074cf5d..630b643 100644 --- a/src/afs/VNOPS/afs_vnop_lookup.c +++ b/src/afs/VNOPS/afs_vnop_lookup.c @@ -1514,9 +1514,7 @@ afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, afs_ucred_t *acr if (tvc) { if (no_read_access && vType(tvc) != VDIR && vType(tvc) != VLNK) { /* need read access on dir to stat non-directory / non-link */ -#ifndef AFS_FBSD80_ENV afs_PutVCache(tvc); -#endif *avcp = NULL; code = EACCES; goto done; @@ -1672,9 +1670,7 @@ afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, afs_ucred_t *acr /* if the vcache isn't usable, release it */ if (tvc && !(tvc->f.states & CStatd)) { -#ifndef AFS_FBSD80_ENV afs_PutVCache(tvc); -#endif tvc = NULL; } } else { @@ -1737,9 +1733,7 @@ afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, afs_ucred_t *acr ReleaseWriteLock(&tvc->lock); if (code) { -#ifndef AFS_FBSD80_ENV afs_PutVCache(tvc); -#endif if (tvolp) afs_PutVolume(tvolp, WRITE_LOCK); goto done; @@ -1761,9 +1755,7 @@ afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, afs_ucred_t *acr } else { tvc = afs_GetVCache(tvc->mvid, &treq, NULL, NULL); } -#ifndef AFS_FBSD80_ENV afs_PutVCache(uvc); /* we're done with it */ -#endif if (!tvc) { code = ENOENT; @@ -1788,9 +1780,7 @@ afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, afs_ucred_t *acr afs_PutVolume(tvolp, WRITE_LOCK); } } else { -#ifndef AFS_FBSD80_ENV afs_PutVCache(tvc); -#endif code = ENOENT; if (tvolp) afs_PutVolume(tvolp, WRITE_LOCK); -- 1.9.4