Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Feb 2010 17:10:41 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r204468 - head/sys/fs/msdosfs
Message-ID:  <201002281710.o1SHAfou040084@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sun Feb 28 17:10:41 2010
New Revision: 204468
URL: http://svn.freebsd.org/changeset/base/204468

Log:
  In msdosfs_inactive(), reclaim the vnodes both for SLOT_DELETED and
  SLOT_EMPTY deName[0] values. Besides conforming to FAT specification, it
  also clears the issue where vfs_hash_insert found the vnode in hash, and
  newly allocated vnode is vput()ed. There, deName[0] == 0, and vnode is
  not reclaimed, indefinitely kept on mountlist.
  
  Tested by:	pho
  MFC after:	3 weeks

Modified:
  head/sys/fs/msdosfs/msdosfs_denode.c

Modified: head/sys/fs/msdosfs/msdosfs_denode.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_denode.c	Sun Feb 28 17:09:09 2010	(r204467)
+++ head/sys/fs/msdosfs/msdosfs_denode.c	Sun Feb 28 17:10:41 2010	(r204468)
@@ -593,7 +593,7 @@ msdosfs_inactive(ap)
 	/*
 	 * Ignore denodes related to stale file handles.
 	 */
-	if (dep->de_Name[0] == SLOT_DELETED)
+	if (dep->de_Name[0] == SLOT_DELETED || dep->de_Name[0] == SLOT_EMPTY)
 		goto out;
 
 	/*
@@ -621,7 +621,7 @@ out:
 	printf("msdosfs_inactive(): v_usecount %d, de_Name[0] %x\n",
 	       vrefcnt(vp), dep->de_Name[0]);
 #endif
-	if (dep->de_Name[0] == SLOT_DELETED)
+	if (dep->de_Name[0] == SLOT_DELETED || dep->de_Name[0] == SLOT_EMPTY)
 		vrecycle(vp, td);
 	return (error);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002281710.o1SHAfou040084>