If block size is zero, use normal file operations to do I/O,

this eliminates a divided-by-zero fault.

Recommended by: phk
This commit is contained in:
David Xu 2006-02-22 00:05:12 +00:00
parent 7097537784
commit ad8de0f243

View File

@ -1117,6 +1117,9 @@ aio_qphysio(struct proc *p, struct aiocblist *aiocbe)
return (error);
}
if (vp->v_bufobj.bo_bsize == 0)
return (-1);
if (cb->aio_nbytes % vp->v_bufobj.bo_bsize)
return (-1);