Commit 790816dd authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] blockdev direct_io: fix signedness bug

size_t is unsigned.  IO errors aren't getting through.

Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 58d9ce7d
...@@ -146,7 +146,7 @@ static int blk_end_aio(struct bio *bio, unsigned int bytes_done, int error) ...@@ -146,7 +146,7 @@ static int blk_end_aio(struct bio *bio, unsigned int bytes_done, int error)
iocb->ki_nbytes = -EIO; iocb->ki_nbytes = -EIO;
if (atomic_dec_and_test(bio_count)) { if (atomic_dec_and_test(bio_count)) {
if (iocb->ki_nbytes < 0) if ((long)iocb->ki_nbytes < 0)
aio_complete(iocb, iocb->ki_nbytes, 0); aio_complete(iocb, iocb->ki_nbytes, 0);
else else
aio_complete(iocb, iocb->ki_left, 0); aio_complete(iocb, iocb->ki_left, 0);
......
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