]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] blockdev direct_io: fix signedness bug
authorAndrew Morton <akpm@osdl.org>
Tue, 23 Jan 2007 04:40:35 +0000 (20:40 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 23 Jan 2007 15:52:05 +0000 (07:52 -0800)
size_t is unsigned.  IO errors aren't getting through.

Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/block_dev.c

index 8b18e43b82fe8e156bab431070a882ea5cb9a5bf..da020be25dd2429004e43cb61988293daab86854 100644 (file)
@@ -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);