Commit a3b924e3 authored by Nathan Scott's avatar Nathan Scott Committed by Christoph Hellwig

[XFS] Make buffer error checking consistent, add a value range check.

SGI Modid: xfs-linux:xfs-kern:169542a
parent 8f20dd0f
......@@ -1151,9 +1151,10 @@ pagebuf_iodone(
void
pagebuf_ioerror( /* mark/clear buffer error flag */
xfs_buf_t *pb, /* buffer to mark */
unsigned int error) /* error to store (0 if none) */
int error) /* error to store (0 if none) */
{
pb->pb_error = error;
ASSERT(error >= 0 && error <= 0xffff);
pb->pb_error = (unsigned short)error;
PB_TRACE(pb, "ioerror", (unsigned long)error);
}
......
......@@ -250,7 +250,7 @@ extern void pagebuf_iodone( /* mark buffer I/O complete */
extern void pagebuf_ioerror( /* mark buffer in error (or not) */
xfs_buf_t *, /* buffer to mark */
unsigned int); /* error to store (0 if none) */
int); /* error to store (0 if none) */
extern int pagebuf_iostart( /* start I/O on a buffer */
xfs_buf_t *, /* buffer to start */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment