aboutsummaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2007-01-22 23:40:35 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-01-23 10:52:05 -0500
commit790816dd54e22827f63c8cbb30bd623d3d45e594 (patch)
treea67e4ee5302857b60a9ee6ad158123d2af0fd088 /fs/block_dev.c
parent58d9ce7d751fa11c6c8ea5dcd4d63b320aae1363 (diff)
[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: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r--fs/block_dev.c2
1 files changed, 1 insertions, 1 deletions
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)
146 iocb->ki_nbytes = -EIO; 146 iocb->ki_nbytes = -EIO;
147 147
148 if (atomic_dec_and_test(bio_count)) { 148 if (atomic_dec_and_test(bio_count)) {
149 if (iocb->ki_nbytes < 0) 149 if ((long)iocb->ki_nbytes < 0)
150 aio_complete(iocb, iocb->ki_nbytes, 0); 150 aio_complete(iocb, iocb->ki_nbytes, 0);
151 else 151 else
152 aio_complete(iocb, iocb->ki_left, 0); 152 aio_complete(iocb, iocb->ki_left, 0);