diff options
author | truckman <truckman@FreeBSD.org> | 2004-03-15 06:42:40 +0000 |
---|---|---|
committer | truckman <truckman@FreeBSD.org> | 2004-03-15 06:42:40 +0000 |
commit | b7a6af3cc97ed702243c417b87a32b192556f1ca (patch) | |
tree | 85b5951c4e6b33e8155f7f84f90e482148583b0a /sys/kern | |
parent | 4a8aedf7cf357ba29a6e8a503b49e0fa4aaa14ea (diff) | |
download | FreeBSD-src-b7a6af3cc97ed702243c417b87a32b192556f1ca.zip FreeBSD-src-b7a6af3cc97ed702243c417b87a32b192556f1ca.tar.gz |
Revert to the original vslock() and vsunlock() API with the following
exceptions:
Retain the recently added vslock() error return.
The type of the len argument should be size_t, not u_int.
Suggested by: bde
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_sysctl.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index f129df8..912eb00 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1000,8 +1000,7 @@ kernel_sysctl(struct thread *td, int *name, u_int namelen, void *old, error = sysctl_root(0, name, namelen, &req); if (req.lock == REQ_WIRED) - vsunlock(req.td, (vm_offset_t)req.oldptr, - (vm_size_t)req.wiredlen); + vsunlock(req.oldptr, req.wiredlen); SYSCTL_UNLOCK(); @@ -1103,8 +1102,7 @@ sysctl_wire_old_buffer(struct sysctl_req *req, size_t len) ret = 0; if (req->lock == REQ_LOCKED && req->oldptr && req->oldfunc == sysctl_old_user) { - ret = vslock(req->td, (vm_offset_t)req->oldptr, - (vm_size_t)wiredlen); + ret = vslock(req->oldptr, wiredlen); if (ret == 0) { req->lock = REQ_WIRED; req->wiredlen = wiredlen; @@ -1320,8 +1318,7 @@ userland_sysctl(struct thread *td, int *name, u_int namelen, void *old, req = req2; if (req.lock == REQ_WIRED) - vsunlock(req.td, (vm_offset_t)req.oldptr, - (vm_size_t)req.wiredlen); + vsunlock(req.oldptr, req.wiredlen); SYSCTL_UNLOCK(); |