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:
parent
7097537784
commit
ad8de0f243
@ -1117,6 +1117,9 @@ aio_qphysio(struct proc *p, struct aiocblist *aiocbe)
|
|||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vp->v_bufobj.bo_bsize == 0)
|
||||||
|
return (-1);
|
||||||
|
|
||||||
if (cb->aio_nbytes % vp->v_bufobj.bo_bsize)
|
if (cb->aio_nbytes % vp->v_bufobj.bo_bsize)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user