Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66073
b: refs/heads/master
c: 9cc54d4
h: refs/heads/master
i:
  66071: 8a72dec
v: v3
  • Loading branch information
NeilBrown authored and Jens Axboe committed Oct 10, 2007
1 parent af20e43 commit 2eb3719
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d24517d793f21edab1a411da95f2c45cb88a84aa
refs/heads/master: 9cc54d40b8ca01fcefc9151044b6996565061d90
4 changes: 3 additions & 1 deletion trunk/fs/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,8 @@ void bio_endio(struct bio *bio, unsigned int bytes_done, int error)
{
if (error)
clear_bit(BIO_UPTODATE, &bio->bi_flags);
else if (!test_bit(BIO_UPTODATE, &bio->bi_flags))
error = -EIO;

if (unlikely(bytes_done > bio->bi_size)) {
printk("%s: want %u bytes done, only %u left\n", __FUNCTION__,
Expand All @@ -1028,7 +1030,7 @@ void bio_endio(struct bio *bio, unsigned int bytes_done, int error)
bio->bi_size -= bytes_done;
bio->bi_sector += (bytes_done >> 9);

if (bio->bi_end_io)
if (bio->bi_size && bio->bi_end_io)
bio->bi_end_io(bio, bytes_done, error);
}

Expand Down

0 comments on commit 2eb3719

Please sign in to comment.