- use a shared lock for reads
- remove stale comment Reviewed by: jeffr
This commit is contained in:
parent
aff238b63c
commit
5e6a926611
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=191028
@ -379,14 +379,8 @@ vn_rdwr(rw, vp, base, len, offset, segflg, ioflg, active_cred, file_cred,
|
||||
!= 0)
|
||||
return (error);
|
||||
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
|
||||
} else {
|
||||
/*
|
||||
* 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);
|
||||
}
|
||||
} else
|
||||
vn_lock(vp, LK_SHARED | LK_RETRY);
|
||||
|
||||
}
|
||||
ASSERT_VOP_LOCKED(vp, "IO_NODELOCKED with no vp lock held");
|
||||
|
Loading…
Reference in New Issue
Block a user