Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jun 2009 16:50:03 +0000 (UTC)
From:      Paul Saab <ps@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r193442 - head/sys/kern
Message-ID:  <200906041650.n54Go34d097782@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 {



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