svn commit: r187527 - head/sys/vm
John Baldwin
jhb at FreeBSD.org
Wed Jan 21 06:43:37 PST 2009
Author: jhb
Date: Wed Jan 21 14:43:35 2009
New Revision: 187527
URL: http://svn.freebsd.org/changeset/base/187527
Log:
Now that vfs_markatime() no longer requires an exclusive lock due to
the VOP_MARKATIME() changes, use a shared vnode lock for mmap().
Submitted by: ups
Modified:
head/sys/vm/vm_mmap.c
Modified: head/sys/vm/vm_mmap.c
==============================================================================
--- head/sys/vm/vm_mmap.c Wed Jan 21 14:42:00 2009 (r187526)
+++ head/sys/vm/vm_mmap.c Wed Jan 21 14:43:35 2009 (r187527)
@@ -1160,7 +1160,7 @@ vm_mmap_vnode(struct thread *td, vm_size
mp = vp->v_mount;
cred = td->td_ucred;
vfslocked = VFS_LOCK_GIANT(mp);
- if ((error = vget(vp, LK_EXCLUSIVE, td)) != 0) {
+ if ((error = vget(vp, LK_SHARED, td)) != 0) {
VFS_UNLOCK_GIANT(vfslocked);
return (error);
}
@@ -1177,7 +1177,7 @@ vm_mmap_vnode(struct thread *td, vm_size
if (obj->handle != vp) {
vput(vp);
vp = (struct vnode*)obj->handle;
- vget(vp, LK_EXCLUSIVE, td);
+ vget(vp, LK_SHARED, td);
}
type = OBJT_VNODE;
handle = vp;
More information about the svn-src-all
mailing list