vn_start_write() is called only when v_type != VCHR, so corresponding

vn_finished_write() should also be called only then.

BTW. I fixed two functions here: vn_rdwr() and vn_write(). The latter seems
to be unused.

MFC after:	3 weeks
This commit is contained in:
Pawel Jakub Dawidek 2006-04-28 21:54:05 +00:00
parent 64e16bf0e1
commit 122410eea2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=158128

View File

@ -404,7 +404,7 @@ vn_rdwr(rw, vp, base, len, offset, segflg, ioflg, active_cred, file_cred,
if (auio.uio_resid && error == 0)
error = EIO;
if ((ioflg & IO_NODELOCKED) == 0) {
if (rw == UIO_WRITE)
if (rw == UIO_WRITE && vp->v_type != VCHR)
vn_finished_write(mp);
VOP_UNLOCK(vp, 0, td);
}
@ -569,7 +569,8 @@ vn_write(fp, uio, active_cred, flags, td)
fp->f_offset = uio->uio_offset;
fp->f_nextoff = uio->uio_offset;
VOP_UNLOCK(vp, 0, td);
vn_finished_write(mp);
if (vp->v_type != VCHR)
vn_finished_write(mp);
unlock:
VFS_UNLOCK_GIANT(vfslocked);
return (error);