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:
parent
bd6b3ab411
commit
3b9d7e4828
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user