Bug 29974

Summary: smbfs generates a ''Negative opencount'' error message on unmount
Product: Base System Reporter: Andre Guibert de Bruet <andre>
Component: kernAssignee: Boris Popov <bp>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Andre Guibert de Bruet 2001-08-23 07:50:00 UTC
Unmounting an smbfs filesystem generates a "Negative opencount" message on two (so far) different 4.4-RC i386 machines. I have been able to reproduce this with both the kld and the in-kernel versions of smbfs. I traced down the error message and it comes from a call to smb_closel() in /usr/src/sys/fs/smbfs/smbfs_vnops.c.

Fix: 

I created a patch which addresses the issue. It is available at http://siliconlandmark.com/staff/andre/smbfs.diff .
How-To-Repeat: Either compile a kernel with smbfs or load the kld. Mount an smb filesystem and unmount it.
Comment 1 ru freebsd_committer freebsd_triage 2001-09-19 08:57:22 UTC
Responsible Changed
From-To: freebsd-bugs->bp

Boris, could you please look at this?
Comment 2 Sheldon Hearn freebsd_committer freebsd_triage 2001-12-27 12:38:43 UTC
State Changed
From-To: open->closed

The problem has been worked around in rev 1.15 of smbfs_vnops.c, 
which was merged onto RELENG_4 as rev 1.2.2.4.