diff options
author | jhb <jhb@FreeBSD.org> | 2009-01-21 14:43:35 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-01-21 14:43:35 +0000 |
commit | dc43531891e4226acd560977e364ab94ea62c9e9 (patch) | |
tree | 3818311958ed0a9433e52edd6cf1480b9b3bd497 /sys/vm | |
parent | 47455a7b41fddec8ed401d12470434bd77477189 (diff) | |
download | FreeBSD-src-dc43531891e4226acd560977e364ab94ea62c9e9.zip FreeBSD-src-dc43531891e4226acd560977e364ab94ea62c9e9.tar.gz |
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
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_mmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 3f1d43d..2d668c4 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -1160,7 +1160,7 @@ vm_mmap_vnode(struct thread *td, vm_size_t objsize, 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_t objsize, 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; |