diff options
| author | Matthew Dillon <dillon@FreeBSD.org> | 2000-05-15 16:50:33 +0000 |
|---|---|---|
| committer | Matthew Dillon <dillon@FreeBSD.org> | 2000-05-15 16:50:33 +0000 |
| commit | 01b42d297ea539cdf473260ceabd675c1f2d8458 (patch) | |
| tree | a79eb9dc3b054ded4a6db702c3e2cd39ef856990 /sys/dev/vn | |
| parent | 8c011735862bc6c01ae417d2dea7d0f86b361f5b (diff) | |
Notes
Diffstat (limited to 'sys/dev/vn')
| -rw-r--r-- | sys/dev/vn/vn.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/vn/vn.c b/sys/dev/vn/vn.c index 49fa104a0918..73b2ee1662c0 100644 --- a/sys/dev/vn/vn.c +++ b/sys/dev/vn/vn.c @@ -281,8 +281,6 @@ vnstrategy(struct buf *bp) struct vn_softc *vn; int error; int isvplocked = 0; - struct uio auio; - struct iovec aiov; unit = dkunit(bp->b_dev); vn = bp->b_dev->si_drv1; @@ -362,6 +360,11 @@ vnstrategy(struct buf *bp) * B_INVAL because (for a write anyway), the buffer is * still valid. */ + struct uio auio; + struct iovec aiov; + + bzero(&auio, sizeof(auio)); + aiov.iov_base = bp->b_data; aiov.iov_len = bp->b_bcount; auio.uio_iov = &aiov; @@ -672,8 +675,6 @@ vniocattach_swap(vn, vio, dev, flag, p) int vnsetcred(struct vn_softc *vn, struct ucred *cred) { - struct uio auio; - struct iovec aiov; char *tmpbuf; int error = 0; @@ -690,7 +691,11 @@ vnsetcred(struct vn_softc *vn, struct ucred *cred) */ if (vn->sc_vp) { + struct uio auio; + struct iovec aiov; + tmpbuf = malloc(vn->sc_secsize, M_TEMP, M_WAITOK); + bzero(&auio, sizeof(auio)); aiov.iov_base = tmpbuf; aiov.iov_len = vn->sc_secsize; |
