[OpenAFS-devel] iput fixes for openafs and TR-60276
Nathan Neulinger
nneul@umr.edu
Mon, 16 Apr 2001 12:13:16 -0500
--SLDf9lqlvOQaIe6s
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Gets rid of the check against 0xffff since it is bogus, and doesn't
actually protect afsd against anything, just triggers a panic when the
machine could keep running just fine. (Obviously a leak isn't good, but
why kill AFS when you don't have to.)
Add a VN_RELE(avc) call to the end of check_bad_parent to get rid of the
reference obtained by check_bad_parent. This might not be the correct
solution, but it does fix the IPUT errors I've been seeing with leaking
refCounts.
If there is a better or more correct solution, please pass it along.
-- Nathan
------------------------------------------------------------
Nathan Neulinger EMail: nneul@umr.edu
University of Missouri - Rolla Phone: (573) 341-4841
Computing Services Fax: (573) 341-4216
--SLDf9lqlvOQaIe6s
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="iput.diff"
Index: osi_misc.c
===================================================================
RCS file: /cvs/openafs/src/afs/LINUX/osi_misc.c,v
retrieving revision 1.5
diff -u -r1.5 osi_misc.c
--- osi_misc.c 2001/01/31 02:28:11 1.5
+++ osi_misc.c 2001/04/16 17:09:14
@@ -348,9 +348,9 @@
AFS_GLOCK();
#if defined(AFS_LINUX24_ENV)
- if (atomic_read(&ip->i_count) == 0 || atomic_read(&ip->i_count) & 0xffff0000) {
+ if (atomic_read(&ip->i_count) == 0) {
#else
- if (ip->i_count == 0 || ip->i_count & 0xffff0000) {
+ if (ip->i_count == 0) {
#endif
osi_Panic("IPUT Bad refCount %d on inode 0x%x\n",
#if defined(AFS_LINUX24_ENV)
@@ -411,6 +411,8 @@
ICL_TYPE_POINTER, avc,
ICL_TYPE_POINTER, dp);
}
+
+ VN_RELE(avc); /* get rid of reference obtained by afs_lookup */
} /* if bad parent */
--SLDf9lqlvOQaIe6s--