Commit 9aa8863f authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] dio_bio_reap() return value fix

This function doesn't correctly accumulate -EIO for its caller.
parent 81779415
......@@ -446,12 +446,15 @@ static int dio_bio_reap(struct dio *dio)
while (dio->bio_list) {
unsigned long flags;
struct bio *bio;
int ret2;
spin_lock_irqsave(&dio->bio_lock, flags);
bio = dio->bio_list;
dio->bio_list = bio->bi_private;
spin_unlock_irqrestore(&dio->bio_lock, flags);
ret = dio_bio_complete(dio, bio);
ret2 = dio_bio_complete(dio, bio);
if (ret == 0)
ret = ret2;
}
dio->reap_counter = 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment