When checking for shared writes, use the struct mount returned from

vn_start_write.

Reviewed by:	jhb
This commit is contained in:
Paul Saab 2009-06-04 16:50:03 +00:00
parent a6d545d8ed
commit 983b43c5de
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=193442

View File

@ -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 {