]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] loop breakage fix
authorAlexander Viro <viro@math.psu.edu>
Wed, 30 Oct 2002 01:13:01 +0000 (17:13 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Wed, 30 Oct 2002 01:13:01 +0000 (17:13 -0800)
Got it.  Breakage happened when Jens was switching to partial
completions - !uptodate is not quite the same as !err ;-)

With this fixed everything seems to work nicely.

drivers/block/loop.c

index c5f84ce46bb219876bfc88de61b594ec9cef66bf..605fd37e14ee0074121dea9bd7a8db9e0017be57 100644 (file)
@@ -437,7 +437,7 @@ static int loop_end_io_transfer(struct bio *bio, unsigned int bytes_done, int er
        if (bio->bi_size)
                return 1;
 
-       if (!err || bio_rw(bio) == WRITE) {
+       if (err || bio_rw(bio) == WRITE) {
                bio_endio(rbh, rbh->bi_size, err);
                if (atomic_dec_and_test(&lo->lo_pending))
                        up(&lo->lo_bh_mutex);