From: Chas Williams Date: Tue, 29 Nov 2005 03:20:28 +0000 (+0000) Subject: STABLE14-linux-afs-put-inode-dont-race-20051128 X-Git-Tag: openafs-stable-1_4_1-rc2~18 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=6fb579688902f4a7b8808c19af63a0b2c2dabd58;p=packages%2Fo%2Fopenafs.git STABLE14-linux-afs-put-inode-dont-race-20051128 FIXES 23318 hold lock across refcount check. oops (cherry picked from commit bb7b7cef7916787f55f51a6dc070e1fa4ca08021) --- diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c index 8d6ce9bdd..63d14577b 100644 --- a/src/afs/LINUX/osi_vfsops.c +++ b/src/afs/LINUX/osi_vfsops.c @@ -343,12 +343,12 @@ afs_put_inode(struct inode *ip) { struct vcache *vcp = VTOAFS(ip); + AFS_GLOCK(); if (VREFCOUNT(vcp) == 2) { - AFS_GLOCK(); if (VREFCOUNT(vcp) == 2) afs_InactiveVCache(vcp, NULL); - AFS_GUNLOCK(); } + AFS_GUNLOCK(); } /* afs_put_super