Date: Fri, 30 Apr 2010 03:10:53 +0000 (UTC) From: Alfred Perlstein <alfred@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r207415 - head/sys/kern Message-ID: <201004300310.o3U3Ar7l040612@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alfred Date: Fri Apr 30 03:10:53 2010 New Revision: 207415 URL: http://svn.freebsd.org/changeset/base/207415 Log: Do not set IO_NODELOCKED while writing to vnodes as our consumers do not lock the vnodes. Obtained from: Juniper Networks Reviewed by: jhb Modified: head/sys/kern/kern_gzio.c Modified: head/sys/kern/kern_gzio.c ============================================================================== --- head/sys/kern/kern_gzio.c Fri Apr 30 03:06:53 2010 (r207414) +++ head/sys/kern/kern_gzio.c Fri Apr 30 03:10:53 2010 (r207415) @@ -166,7 +166,7 @@ gzFile gz_open (path, mode, vp) 0 /*xflags*/, OS_CODE); 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))) { s->outoff += GZ_HEADER_LEN - resid; return destroy(s), (gzFile)Z_NULL; @@ -234,7 +234,7 @@ int ZEXPORT gzwrite (file, buf, len) 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_NODELOCKED|IO_UNIT, + curoff, UIO_SYSSPACE, IO_UNIT, curproc->p_ucred, NOCRED, &resid, curthread); VFS_UNLOCK_GIANT(vfslocked); if (error) { @@ -291,7 +291,7 @@ local int do_flush (file, flush) 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_NODELOCKED|IO_UNIT, curproc->p_ucred, + UIO_SYSSPACE, IO_UNIT, curproc->p_ucred, NOCRED, &resid, curthread); VFS_UNLOCK_GIANT(vfslocked); if (error) { @@ -350,7 +350,7 @@ local void putU32 (s, x) xx = x; #endif 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); s->outoff += sizeof(xx) - resid; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004300310.o3U3Ar7l040612>