mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08:00
[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>
This commit is contained in:
parent
58d9ce7d75
commit
790816dd54
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user