]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Md sync: Remove compiler warning that revealed a bug.
authorNeil Brown <neilb@cse.unsw.edu.au>
Thu, 20 Jun 2002 05:23:20 +0000 (22:23 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Thu, 20 Jun 2002 05:23:20 +0000 (22:23 -0700)
When we abort a resync before we even started (because we were
interrupted while waiting for a conflicting resync to finish)
we should not wait or, particularly, do the closing sync_request
(as we haven't even calculated max_sectors yet).

drivers/md/md.c

index 519fd7be7d594e626492d7bab4d3f44c97c380b5..6bcf2f99ace23e1ad941aa412fb7ac809979e4cc 100644 (file)
@@ -3230,7 +3230,7 @@ static void md_do_sync(void *data)
                                        flush_curr_signals();
                                        err = -EINTR;
                                        mddev_put(mddev2);
-                                       goto out;
+                                       goto skip;
                                }
                        }
                }
@@ -3331,11 +3331,11 @@ static void md_do_sync(void *data)
        /*
         * this also signals 'finished resyncing' to md_stop
         */
-out:
+ out:
        wait_event(mddev->recovery_wait, !atomic_read(&mddev->recovery_active));
        /* tell personality that we are finished */
        mddev->pers->sync_request(mddev, max_sectors, 1);
-
+ skip:
        mddev->curr_resync = 0;
        if (err)
                mddev->recovery_running = err;