Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jul 2009 11:44:08 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 166728 for review
Message-ID:  <200907291144.n6TBi8i0051878@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help

http://perforce.freebsd.org/chv.cgi?CH=166728

Change 166728 by jhb@jhb_jhbbsd on 2009/07/29 11:43:49

	Address a LOR between vnode locks and the filedesc lock.  The
	normal order is filedesc -> vnode (e.g. in the poll() system
	call).  In this case, mountcheckdirs() doesn't actually need the
	vnodes in question locked, it just needs them referenced, so we
	can safely drop the vnode locks before mountcheckdirs() rather
	than after.

Affected files ...

.. //depot/projects/smpng/sys/kern/vfs_mount.c#97 edit

Differences ...

==== //depot/projects/smpng/sys/kern/vfs_mount.c#97 (text+ko) ====

@@ -1069,9 +1069,10 @@
 		vfs_event_signal(NULL, VQ_MOUNT, 0);
 		if (VFS_ROOT(mp, LK_EXCLUSIVE, &newdp))
 			panic("mount: lost mount");
+		VOP_UNLOCK(newdp, 0);
+		VOP_UNLOCK(vp, 0);
 		mountcheckdirs(vp, newdp);
-		vput(newdp);
-		VOP_UNLOCK(vp, 0);
+		vrele(newdp);
 		if ((mp->mnt_flag & MNT_RDONLY) == 0)
 			error = vfs_allocate_syncvnode(mp);
 		vfs_unbusy(mp);



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