svn commit: r232644 - stable/9/sys/fs/nullfs

Konstantin Belousov kib at FreeBSD.org
Wed Mar 7 08:02:44 UTC 2012


Author: kib
Date: Wed Mar  7 08:02:43 2012
New Revision: 232644
URL: http://svn.freebsd.org/changeset/base/232644

Log:
  MFC r232301:
  Always request exclusive lock for the lower vnode in nullfs_vget().
  The null_nodeget() requires exclusive lock on lowervp to be able to
  insmntque() new vnode.

Modified:
  stable/9/sys/fs/nullfs/null_vfsops.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/fs/nullfs/null_vfsops.c
==============================================================================
--- stable/9/sys/fs/nullfs/null_vfsops.c	Wed Mar  7 07:59:30 2012	(r232643)
+++ stable/9/sys/fs/nullfs/null_vfsops.c	Wed Mar  7 08:02:43 2012	(r232644)
@@ -307,6 +307,12 @@ nullfs_vget(mp, ino, flags, vpp)
 	struct vnode **vpp;
 {
 	int error;
+
+	KASSERT((flags & LK_TYPE_MASK) != 0,
+	    ("nullfs_vget: no lock requested"));
+	flags &= ~LK_TYPE_MASK;
+	flags |= LK_EXCLUSIVE;
+
 	error = VFS_VGET(MOUNTTONULLMOUNT(mp)->nullm_vfs, ino, flags, vpp);
 	if (error)
 		return (error);


More information about the svn-src-all mailing list