From: Andrew Morton Date: Tue, 23 Jan 2007 04:40:35 +0000 (-0800) Subject: [PATCH] blockdev direct_io: fix signedness bug X-Git-Tag: v2.6.20-rc6~43 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=790816dd54e22827f63c8cbb30bd623d3d45e594;p=karo-tx-linux.git [PATCH] blockdev direct_io: fix signedness bug size_t is unsigned. IO errors aren't getting through. Cc: "Chen, Kenneth W" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/block_dev.c b/fs/block_dev.c index 8b18e43b82fe..da020be25dd2 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -146,7 +146,7 @@ static int blk_end_aio(struct bio *bio, unsigned int bytes_done, int error) iocb->ki_nbytes = -EIO; 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); else aio_complete(iocb, iocb->ki_left, 0);