Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Sep 2009 12:05:39 +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: r196733 - head/sys/kern
Message-ID:  <200909011205.n81C5dSV060831@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Tue Sep  1 12:05:39 2009
New Revision: 196733
URL: http://svn.freebsd.org/changeset/base/196733

Log:
  Fix mount reference leak when V_XSLEEP is specified to vn_start_write().
  
  Submitted by:	tegge

Modified:
  head/sys/kern/vfs_vnops.c

Modified: head/sys/kern/vfs_vnops.c
==============================================================================
--- head/sys/kern/vfs_vnops.c	Tue Sep  1 12:04:43 2009	(r196732)
+++ head/sys/kern/vfs_vnops.c	Tue Sep  1 12:05:39 2009	(r196733)
@@ -999,7 +999,7 @@ vn_start_write(vp, mpp, flags)
 		goto unlock;
 	mp->mnt_writeopcount++;
 unlock:
-	if (error != 0)
+	if (error != 0 || (flags & V_XSLEEP) != 0)
 		MNT_REL(mp);
 	MNT_IUNLOCK(mp);
 	return (error);



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