From nobody@FreeBSD.org  Wed Aug 22 23:47:06 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 3540A37B40A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Aug 2001 23:47:06 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f7N6kcp85890;
	Wed, 22 Aug 2001 23:46:38 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200108230646.f7N6kcp85890@freefall.freebsd.org>
Date: Wed, 22 Aug 2001 23:46:38 -0700 (PDT)
From: Andre Guibert de Bruet <andre@siliconlandmark.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: smbfs generates a ''Negative opencount'' error message on unmount
X-Send-Pr-Version: www-1.0

>Number:         29974
>Category:       kern
>Synopsis:       smbfs generates a ''Negative opencount'' error message on unmount
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 22 23:50:00 PDT 2001
>Closed-Date:    Thu Dec 27 04:38:43 PST 2001
>Last-Modified:  Thu Dec 27 04:40:49 PST 2001
>Originator:     Andre Guibert de Bruet
>Release:        FreeBSD 4.4-RC i386
>Organization:
>Environment:
FreeBSD theta.properkernel.com 4.4-RC FreeBSD 4.4-RC #0: Thu Aug 23 00:26:18 EDT 2001     root@theta.properkernel.com:/usr/src/sys/compile/THETA  i386
>Description:
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.
>How-To-Repeat:
Either compile a kernel with smbfs or load the kld. Mount an smb filesystem and unmount it.
>Fix:
I created a patch which addresses the issue. It is available at http://siliconlandmark.com/staff/andre/smbfs.diff .
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->bp 
Responsible-Changed-By: ru 
Responsible-Changed-When: Wed Sep 19 00:57:22 PDT 2001 
Responsible-Changed-Why:  
Boris, could you please look at this? 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=29974 
State-Changed-From-To: open->closed 
State-Changed-By: sheldonh 
State-Changed-When: Thu Dec 27 04:38:43 PST 2001 
State-Changed-Why:  
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. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=29974 
>Unformatted:
