Merge branches 'for-3.19/hid-report-len', 'for-3.19/i2c-hid', 'for-3.19/lenovo',...
[firefly-linux-kernel-4.4.55.git] / drivers / md / raid10.c
index a2788bcf75b25ac456f993b3a03cd33bdc3acb71..32e282f4c83c3aa2bfe7e911327b4172cf8dc22d 100644 (file)
@@ -366,7 +366,6 @@ static void raid10_end_read_request(struct bio *bio, int error)
        struct md_rdev *rdev;
        struct r10conf *conf = r10_bio->mddev->private;
 
-
        slot = r10_bio->read_slot;
        dev = r10_bio->devs[slot].devnum;
        rdev = r10_bio->devs[slot].rdev;
@@ -1559,7 +1558,6 @@ static void make_request(struct mddev *mddev, struct bio *bio)
 
        md_write_start(mddev, bio);
 
-
        do {
 
                /*
@@ -1782,7 +1780,6 @@ static int raid10_spare_active(struct mddev *mddev)
        return count;
 }
 
-
 static int raid10_add_disk(struct mddev *mddev, struct md_rdev *rdev)
 {
        struct r10conf *conf = mddev->private;
@@ -1929,7 +1926,6 @@ abort:
        return err;
 }
 
-
 static void end_sync_read(struct bio *bio, int error)
 {
        struct r10bio *r10_bio = bio->bi_private;
@@ -2295,7 +2291,6 @@ static void recovery_request_write(struct mddev *mddev, struct r10bio *r10_bio)
        }
 }
 
-
 /*
  * Used by fix_read_error() to decay the per rdev read_errors.
  * We halve the read error count for every hour that has elapsed
@@ -2852,7 +2847,6 @@ static void raid10d(struct md_thread *thread)
        blk_finish_plug(&plug);
 }
 
-
 static int init_resync(struct r10conf *conf)
 {
        int buffs;
@@ -3776,7 +3770,6 @@ static int run(struct mddev *mddev)
                blk_queue_merge_bvec(mddev->queue, raid10_mergeable_bvec);
        }
 
-
        if (md_integrity_register(mddev))
                goto out_free_conf;
 
@@ -3834,6 +3827,8 @@ static int stop(struct mddev *mddev)
                mempool_destroy(conf->r10bio_pool);
        safe_put_page(conf->tmppage);
        kfree(conf->mirrors);
+       kfree(conf->mirrors_old);
+       kfree(conf->mirrors_new);
        kfree(conf);
        mddev->private = NULL;
        return 0;
@@ -4121,7 +4116,7 @@ static int raid10_start_reshape(struct mddev *mddev)
                memcpy(conf->mirrors_new, conf->mirrors,
                       sizeof(struct raid10_info)*conf->prev.raid_disks);
                smp_mb();
-               kfree(conf->mirrors_old); /* FIXME and elsewhere */
+               kfree(conf->mirrors_old);
                conf->mirrors_old = conf->mirrors;
                conf->mirrors = conf->mirrors_new;
                conf->mirrors_new = NULL;
@@ -4575,7 +4570,6 @@ static void end_reshape(struct r10conf *conf)
        conf->fullsync = 0;
 }
 
-
 static int handle_reshape_read_error(struct mddev *mddev,
                                     struct r10bio *r10_bio)
 {