loop: don't increment p->offset with (size_t) -EINVAL
authorRoel Kluin <roel.kluin@gmail.com>
Thu, 5 Mar 2009 07:03:53 +0000 (08:03 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 5 Mar 2009 11:04:57 +0000 (12:04 +0100)
commita3941ec101a5ec54c1e929730afeb196441a171e
treef714362623fb68f2e8e462be854f0feff88b63f1
parent5e18cfd04feca78cc08a6b8b71a60a610de81eaa
loop: don't increment p->offset with (size_t) -EINVAL

Upon a 'transfer error block' size is set to -EINVAL, but this becomes positive
since size is unsigned: p->offset still gets incremented.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
drivers/block/loop.c