PERFORCE change 166728 for review
John Baldwin
jhb at FreeBSD.org
Wed Jul 29 11:44:09 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=166728
Change 166728 by jhb at 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);
More information about the p4-projects
mailing list