]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-put-inode-speedup-20050815
authorChas Williams <chas@cmf.nrl.navy.mil>
Fri, 19 Aug 2005 18:51:50 +0000 (18:51 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 19 Aug 2005 18:51:50 +0000 (18:51 +0000)
FIXES 20820

don't bother with credp

(cherry picked from commit e0d9e434bb778a2507c1cd6d96c1faa2071f2b2c)

src/afs/LINUX/osi_vfsops.c

index 94245fde2a304871e44bf1b726ddfeb4550ff1df..3b6ec40e7fb0d0da3e683cfdad9a5127b9ff0961 100644 (file)
@@ -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