From e0d9e434bb778a2507c1cd6d96c1faa2071f2b2c Mon Sep 17 00:00:00 2001 From: Chas Williams Date: Mon, 15 Aug 2005 16:47:38 +0000 Subject: [PATCH] put-inode-speedup-20050815 FIXES 20820 don't bother with credp --- src/afs/LINUX/osi_vfsops.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c index e79871e7b1..8d6ce9bddc 100644 --- a/src/afs/LINUX/osi_vfsops.c +++ b/src/afs/LINUX/osi_vfsops.c @@ -341,16 +341,14 @@ afs_clear_inode(struct inode *ip) static void afs_put_inode(struct inode *ip) { - cred_t *credp = crref(); struct vcache *vcp = VTOAFS(ip); - AFS_GLOCK(); - ObtainReadLock(&vcp->lock); - if (VREFCOUNT(vcp) == 2) - afs_InactiveVCache(vcp, credp); - ReleaseReadLock(&vcp->lock); - AFS_GUNLOCK(); - crfree(credp); + if (VREFCOUNT(vcp) == 2) { + AFS_GLOCK(); + if (VREFCOUNT(vcp) == 2) + afs_InactiveVCache(vcp, NULL); + AFS_GUNLOCK(); + } } /* afs_put_super