diff options
author | kib <kib@FreeBSD.org> | 2012-10-22 17:50:54 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2012-10-22 17:50:54 +0000 |
commit | 560aa751e0f5cfef868bdf3fab01cdbc5169ef82 (patch) | |
tree | 6e9ef0a47c5e91d26227820c50c9767e84550821 /sys/vm/vm_mmap.c | |
parent | ca71b68ea40c83f641d6485e027368568f244197 (diff) | |
download | FreeBSD-src-560aa751e0f5cfef868bdf3fab01cdbc5169ef82.zip FreeBSD-src-560aa751e0f5cfef868bdf3fab01cdbc5169ef82.tar.gz |
Remove the support for using non-mpsafe filesystem modules.
In particular, do not lock Giant conditionally when calling into the
filesystem module, remove the VFS_LOCK_GIANT() and related
macros. Stop handling buffers belonging to non-mpsafe filesystems.
The VFS_VERSION is bumped to indicate the interface change which does
not result in the interface signatures changes.
Conducted and reviewed by: attilio
Tested by: pho
Diffstat (limited to 'sys/vm/vm_mmap.c')
-rw-r--r-- | sys/vm/vm_mmap.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index e0aab73..74b4ec2 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -1256,7 +1256,7 @@ vm_mmap_vnode(struct thread *td, vm_size_t objsize, vm_offset_t foff; struct mount *mp; struct ucred *cred; - int error, flags, locktype, vfslocked; + int error, flags, locktype; mp = vp->v_mount; cred = td->td_ucred; @@ -1264,11 +1264,8 @@ vm_mmap_vnode(struct thread *td, vm_size_t objsize, locktype = LK_EXCLUSIVE; else locktype = LK_SHARED; - vfslocked = VFS_LOCK_GIANT(mp); - if ((error = vget(vp, locktype, td)) != 0) { - VFS_UNLOCK_GIANT(vfslocked); + if ((error = vget(vp, locktype, td)) != 0) return (error); - } foff = *foffp; flags = *flagsp; obj = vp->v_object; @@ -1288,10 +1285,8 @@ vm_mmap_vnode(struct thread *td, vm_size_t objsize, * underlying fs. */ error = vget(vp, locktype, td); - if (error != 0) { - VFS_UNLOCK_GIANT(vfslocked); + if (error != 0) return (error); - } } if (locktype == LK_EXCLUSIVE) { *writecounted = TRUE; @@ -1344,7 +1339,6 @@ mark_atime: done: vput(vp); - VFS_UNLOCK_GIANT(vfslocked); return (error); } |