Bug 17347

Summary: msdosfs_rename and 'vrele: negative ref count'
Product: Base System Reporter: iedowse <iedowse>
Component: kernAssignee: dwmalone
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.4-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description iedowse 2000-03-12 21:10:00 UTC
	Certain error contitions cause msdosfs_rename() to decrement the
	vnode reference count on 'fdvp' more times than it should.

	In particular, an attempt to replace a non-empty directory
	vrele()'s 'fdvp' twice instead of once.

Fix: The following patch appears to correct the problem, but it should
	be checked over by some filesystem guru. The idea of the change
	is to keep exactly one reference to 'fdvp' at all times. This
	allows the error backout code to to the right thing.
How-To-Repeat: 
	In an msdosfs directory type:

		mkdir -p a/a/b
		mv a/a .

	(the second line may need to be repeated a few times)
Comment 1 Jeremiah Gowdy 2000-05-04 17:41:19 UTC
This patch completely fixed my problem with reguards to the kernel panics
when trees of directory structure are moved or renamed on a FAT32 fs.  It
completely solved my problems, and I've had no noticable adverse effects
from the patch.  I recommend it be implemented asap, because this bug is a
major flaw in the FAT32 support.
Comment 2 dwmalone freebsd_committer freebsd_triage 2000-07-11 12:37:20 UTC
Responsible Changed
From-To: freebsd-bugs->dwmalone

Local PR.
Comment 3 dwmalone freebsd_committer freebsd_triage 2000-07-18 17:02:33 UTC
State Changed
From-To: open->closed

Patch applied to HEAD and RELENG_4.