summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_syscalls.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-10-22 17:50:54 +0000
committerkib <kib@FreeBSD.org>2012-10-22 17:50:54 +0000
commit560aa751e0f5cfef868bdf3fab01cdbc5169ef82 (patch)
tree6e9ef0a47c5e91d26227820c50c9767e84550821 /sys/kern/uipc_syscalls.c
parentca71b68ea40c83f641d6485e027368568f244197 (diff)
downloadFreeBSD-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/kern/uipc_syscalls.c')
-rw-r--r--sys/kern/uipc_syscalls.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 94dd127..8ecaa02 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -1834,7 +1834,6 @@ kern_sendfile(struct thread *td, struct sendfile_args *uap,
struct vm_page *pg;
off_t off, xfsize, fsbytes = 0, sbytes = 0, rem = 0;
int error, hdrlen = 0, mnw = 0;
- int vfslocked;
struct sendfile_sync *sfs = NULL;
/*
@@ -1846,7 +1845,6 @@ kern_sendfile(struct thread *td, struct sendfile_args *uap,
AUDIT_ARG_FD(uap->fd);
if ((error = fgetvp_read(td, uap->fd, CAP_READ, &vp)) != 0)
goto out;
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vn_lock(vp, LK_SHARED | LK_RETRY);
if (vp->v_type == VREG) {
obj = vp->v_object;
@@ -1868,7 +1866,6 @@ kern_sendfile(struct thread *td, struct sendfile_args *uap,
}
}
VOP_UNLOCK(vp, 0);
- VFS_UNLOCK_GIANT(vfslocked);
if (obj == NULL) {
error = EINVAL;
goto out;
@@ -2098,7 +2095,6 @@ retry_space:
/*
* Get the page from backing store.
*/
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
error = vn_lock(vp, LK_SHARED);
if (error != 0)
goto after_read;
@@ -2116,7 +2112,6 @@ retry_space:
td->td_ucred, NOCRED, &resid, td);
VOP_UNLOCK(vp, 0);
after_read:
- VFS_UNLOCK_GIANT(vfslocked);
VM_OBJECT_LOCK(obj);
vm_page_io_finish(pg);
if (!error)
@@ -2270,11 +2265,8 @@ out:
}
if (obj != NULL)
vm_object_deallocate(obj);
- if (vp != NULL) {
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
+ if (vp != NULL)
vrele(vp);
- VFS_UNLOCK_GIANT(vfslocked);
- }
if (so)
fdrop(sock_fp, td);
if (m)
OpenPOWER on IntegriCloud