Skip to content

Commit

Permalink
Now that vfs_markatime() no longer requires an exclusive lock due to
Browse files Browse the repository at this point in the history
the VOP_MARKATIME() changes, use a shared vnode lock for mmap().

Submitted by:	ups
  • Loading branch information
bsdjhb committed Jan 21, 2009
1 parent 47455a7 commit dc43531
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sys/vm/vm_mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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;
Expand Down

0 comments on commit dc43531

Please sign in to comment.