]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] dm: Check the uptodate flag in sub-bios to see if there was an error.
authorAndrew Morton <akpm@osdl.org>
Sat, 17 Apr 2004 10:23:52 +0000 (03:23 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 17 Apr 2004 10:23:52 +0000 (03:23 -0700)
From: Kevin Corry <kevcorry@us.ibm.com>

Check the uptodate flag in sub-bios to see if there was an error.  [Mike
Christie]

drivers/md/dm.c

index 542f9cd0acc056e0d96f7be7ec5a6c8443317b14..49878d917103d0982ed8278150ffdacd3b32c930 100644 (file)
@@ -294,6 +294,9 @@ static int clone_endio(struct bio *bio, unsigned int done, int error)
        if (bio->bi_size)
                return 1;
 
+       if (!bio_flagged(bio, BIO_UPTODATE) && !error)
+               error = -EIO;
+
        if (endio) {
                r = endio(tio->ti, bio, error, &tio->info);
                if (r < 0)