- use a shared lock for reads
- remove stale comment Reviewed by: jeffr
This commit is contained in:
parent
a72478d02d
commit
de9c351c80
@ -379,14 +379,8 @@ vn_rdwr(rw, vp, base, len, offset, segflg, ioflg, active_cred, file_cred,
|
|||||||
!= 0)
|
!= 0)
|
||||||
return (error);
|
return (error);
|
||||||
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
|
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
|
||||||
} else {
|
} else
|
||||||
/*
|
vn_lock(vp, LK_SHARED | LK_RETRY);
|
||||||
* XXX This should be LK_SHARED but I don't trust VFS
|
|
||||||
* enough to leave it like that until it has been
|
|
||||||
* reviewed further.
|
|
||||||
*/
|
|
||||||
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
ASSERT_VOP_LOCKED(vp, "IO_NODELOCKED with no vp lock held");
|
ASSERT_VOP_LOCKED(vp, "IO_NODELOCKED with no vp lock held");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user