Redundant code in my_endio() of read-on-write and error handling dm-dedup-vasily-snippets
authorVasily Tarasov <tarasov@vasily.name>
Mon, 6 Oct 2014 15:36:57 +0000 (11:36 -0400)
committerVasily Tarasov <tarasov@vasily.name>
Mon, 6 Oct 2014 15:36:57 +0000 (11:36 -0400)
Remove some old code that should not be there. Also, it seems
like we should end original bio with the proper
error.

drivers/md/dm-dedup-rw.c

index 9b88bfdc46adfff815b46e061c7df19bbef7a59f..4eec740c0afbb9a049fce47f36d66ce97fc9811a 100644 (file)
@@ -93,9 +93,6 @@ static void my_endio(struct bio *clone, int error)
        struct bio *orig;
        struct bio_vec bv;
 
-       if (!error && !bio_flagged(clone, BIO_UPTODATE))
-               error = -EIO;
-
        /* free the processed pages */
        if (rw == WRITE || rw == READ) {
                bv = bio_iovec(clone);
@@ -106,7 +103,7 @@ static void my_endio(struct bio *clone, int error)
        }
 
        orig = clone->bi_private;
-       bio_endio(orig, 0);
+       bio_endio(orig, error);
 
        bio_put(clone);
 }