svn commit: r193442 - head/sys/kern

Paul Saab ps at FreeBSD.org
Thu Jun 4 16:50:05 UTC 2009


Author: ps
Date: Thu Jun  4 16:50:03 2009
New Revision: 193442
URL: http://svn.freebsd.org/changeset/base/193442

Log:
  When checking for shared writes, use the struct mount returned from
  vn_start_write.
  
  Reviewed by:	jhb

Modified:
  head/sys/kern/vfs_vnops.c

Modified: head/sys/kern/vfs_vnops.c
==============================================================================
--- head/sys/kern/vfs_vnops.c	Thu Jun  4 16:20:19 2009	(r193441)
+++ head/sys/kern/vfs_vnops.c	Thu Jun  4 16:50:03 2009	(r193442)
@@ -594,8 +594,7 @@ vn_write(fp, uio, active_cred, flags, td
 	    (error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0)
 		goto unlock;
  
-	if (vp->v_mount != NULL &&
-	    (vp->v_mount->mnt_kern_flag & MNTK_SHARED_WRITES) &&
+	if (mp != NULL && (mp->mnt_kern_flag & MNTK_SHARED_WRITES) &&
 	    (flags & FOF_OFFSET) != 0) {
 		lock_flags = LK_SHARED;
 	} else {


More information about the svn-src-head mailing list