When checking for shared writes, use the struct mount returned from
vn_start_write. Reviewed by: jhb
This commit is contained in:
parent
a6d545d8ed
commit
983b43c5de
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user