2002-09-04 Ion Badulescu <ion@guppy.limebrokerage.com>
+ * amd/mntfs.c (free_mntfs): sanity check for mf_refc [patch from
+ George Ross ported from 6.1]
+
* amd/srvr_nfs.c (nfs_timed_out): allocate a new XID on server
timeout to avoid problems with late ping replies [patch from
George Ross ported from 6.1]
*
* %W% (Berkeley) %G%
*
- * $Id: mntfs.c,v 1.5.2.2 2002/01/21 00:49:39 ezk Exp $
+ * $Id: mntfs.c,v 1.5.2.3 2002/09/04 20:18:35 ib42 Exp $
*
*/
{
mntfs *mf = v;
+ /*
+ * We shouldn't ever be called to free something that has
+ * a non-positive refcount. Something is badly wrong if
+ * we have been! Ignore the request for now...
+ */
+ if(mf->mf_refc <= 0) {
+ plog(XLOG_ERROR, "IGNORING free_mntfs for <%s>: refc %d, flags %x",
+ mf->mf_mount, mf->mf_refc, mf->mf_flags);
+ return;
+ }
+
if (--mf->mf_refc == 0) {
if (mf->mf_flags & MFF_MOUNTED) {
int quoted;