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/kern/kern_gzio.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/kern/kern_gzio.c')
-rw-r--r-- | sys/kern/kern_gzio.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/sys/kern/kern_gzio.c b/sys/kern/kern_gzio.c index f10998e..15dc301 100644 --- a/sys/kern/kern_gzio.c +++ b/sys/kern/kern_gzio.c @@ -219,7 +219,6 @@ int ZEXPORT gzwrite (file, buf, len) off_t curoff; size_t resid; int error; - int vfslocked; if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; @@ -232,11 +231,9 @@ int ZEXPORT gzwrite (file, buf, len) if (s->stream.avail_out == 0) { s->stream.next_out = s->outbuf; - vfslocked = VFS_LOCK_GIANT(s->file->v_mount); error = vn_rdwr_inchunks(UIO_WRITE, s->file, s->outbuf, Z_BUFSIZE, curoff, UIO_SYSSPACE, IO_UNIT, curproc->p_ucred, NOCRED, &resid, curthread); - VFS_UNLOCK_GIANT(vfslocked); if (error) { log(LOG_ERR, "gzwrite: vn_rdwr return %d\n", error); curoff += Z_BUFSIZE - resid; @@ -274,7 +271,6 @@ local int do_flush (file, flush) gz_stream *s = (gz_stream*)file; off_t curoff = s->outoff; size_t resid; - int vfslocked = 0; int error; if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; @@ -289,11 +285,9 @@ local int do_flush (file, flush) len = Z_BUFSIZE - s->stream.avail_out; if (len != 0) { - vfslocked = VFS_LOCK_GIANT(s->file->v_mount); error = vn_rdwr_inchunks(UIO_WRITE, s->file, s->outbuf, len, curoff, UIO_SYSSPACE, IO_UNIT, curproc->p_ucred, NOCRED, &resid, curthread); - VFS_UNLOCK_GIANT(vfslocked); if (error) { s->z_err = Z_ERRNO; s->outoff = curoff + len - resid; |