Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Dec 2008 11:10:10 +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: r185980 - head/sys/fs/devfs
Message-ID:  <200812121110.mBCBAAWI095832@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Fri Dec 12 11:10:10 2008
New Revision: 185980
URL: http://svn.freebsd.org/changeset/base/185980

Log:
  Do not leak defs_de_interlock on error.
  
  Another pointy hat for my collection.

Modified:
  head/sys/fs/devfs/devfs_vnops.c

Modified: head/sys/fs/devfs/devfs_vnops.c
==============================================================================
--- head/sys/fs/devfs/devfs_vnops.c	Fri Dec 12 07:34:42 2008	(r185979)
+++ head/sys/fs/devfs/devfs_vnops.c	Fri Dec 12 11:10:10 2008	(r185980)
@@ -241,8 +241,10 @@ devfs_vptocnp(struct vop_vptocnp_args *a
 		mtx_unlock(&devfs_de_interlock);
 		vholdl(*dvp);
 		VI_UNLOCK(*dvp);
-	} else
+	} else {
+		mtx_unlock(&devfs_de_interlock);
 		error = ENOENT;
+	}
 finished:
 	sx_xunlock(&dmp->dm_lock);
 	return (error);



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