Do not set IO_NODELOCKED while writing to vnodes as our consumers
do not lock the vnodes. Obtained from: Juniper Networks Reviewed by: jhb
This commit is contained in:
parent
6d74d042e3
commit
feb112c552
@ -166,7 +166,7 @@ gzFile gz_open (path, mode, vp)
|
|||||||
0 /*xflags*/, OS_CODE);
|
0 /*xflags*/, OS_CODE);
|
||||||
|
|
||||||
if ((error = vn_rdwr(UIO_WRITE, s->file, buf, GZ_HEADER_LEN, s->outoff,
|
if ((error = vn_rdwr(UIO_WRITE, s->file, buf, GZ_HEADER_LEN, s->outoff,
|
||||||
UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, curproc->p_ucred,
|
UIO_SYSSPACE, IO_UNIT, curproc->p_ucred,
|
||||||
NOCRED, &resid, curthread))) {
|
NOCRED, &resid, curthread))) {
|
||||||
s->outoff += GZ_HEADER_LEN - resid;
|
s->outoff += GZ_HEADER_LEN - resid;
|
||||||
return destroy(s), (gzFile)Z_NULL;
|
return destroy(s), (gzFile)Z_NULL;
|
||||||
@ -234,7 +234,7 @@ int ZEXPORT gzwrite (file, buf, len)
|
|||||||
s->stream.next_out = s->outbuf;
|
s->stream.next_out = s->outbuf;
|
||||||
vfslocked = VFS_LOCK_GIANT(s->file->v_mount);
|
vfslocked = VFS_LOCK_GIANT(s->file->v_mount);
|
||||||
error = vn_rdwr_inchunks(UIO_WRITE, s->file, s->outbuf, Z_BUFSIZE,
|
error = vn_rdwr_inchunks(UIO_WRITE, s->file, s->outbuf, Z_BUFSIZE,
|
||||||
curoff, UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT,
|
curoff, UIO_SYSSPACE, IO_UNIT,
|
||||||
curproc->p_ucred, NOCRED, &resid, curthread);
|
curproc->p_ucred, NOCRED, &resid, curthread);
|
||||||
VFS_UNLOCK_GIANT(vfslocked);
|
VFS_UNLOCK_GIANT(vfslocked);
|
||||||
if (error) {
|
if (error) {
|
||||||
@ -291,7 +291,7 @@ local int do_flush (file, flush)
|
|||||||
if (len != 0) {
|
if (len != 0) {
|
||||||
vfslocked = VFS_LOCK_GIANT(s->file->v_mount);
|
vfslocked = VFS_LOCK_GIANT(s->file->v_mount);
|
||||||
error = vn_rdwr_inchunks(UIO_WRITE, s->file, s->outbuf, len, curoff,
|
error = vn_rdwr_inchunks(UIO_WRITE, s->file, s->outbuf, len, curoff,
|
||||||
UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, curproc->p_ucred,
|
UIO_SYSSPACE, IO_UNIT, curproc->p_ucred,
|
||||||
NOCRED, &resid, curthread);
|
NOCRED, &resid, curthread);
|
||||||
VFS_UNLOCK_GIANT(vfslocked);
|
VFS_UNLOCK_GIANT(vfslocked);
|
||||||
if (error) {
|
if (error) {
|
||||||
@ -350,7 +350,7 @@ local void putU32 (s, x)
|
|||||||
xx = x;
|
xx = x;
|
||||||
#endif
|
#endif
|
||||||
vn_rdwr(UIO_WRITE, s->file, (caddr_t)&xx, sizeof(xx), curoff,
|
vn_rdwr(UIO_WRITE, s->file, (caddr_t)&xx, sizeof(xx), curoff,
|
||||||
UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, curproc->p_ucred,
|
UIO_SYSSPACE, IO_UNIT, curproc->p_ucred,
|
||||||
NOCRED, &resid, curthread);
|
NOCRED, &resid, curthread);
|
||||||
s->outoff += sizeof(xx) - resid;
|
s->outoff += sizeof(xx) - resid;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user