diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-10-07 11:24:24 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-10-07 11:24:24 +0200 |
commit | 25a9a924c0c8723ced99179eb639e8c5372a2557 (patch) | |
tree | 83170168d50b9703486327b5b3a0bfb1d8da9b2b /drivers/md/raid1.c | |
parent | 0b101e62afe626ecae60173f92f1e0ec72151653 (diff) | |
parent | a0eeb8dd34f21fddfe85b37832b5f3d02ee6e34b (diff) | |
download | talos-op-linux-25a9a924c0c8723ced99179eb639e8c5372a2557.tar.gz talos-op-linux-25a9a924c0c8723ced99179eb639e8c5372a2557.zip |
Merge branch 'linus' into x86/asm, to pick up fixes before applying new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 4517f06c41ba..049df6c4a8cc 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -881,8 +881,7 @@ static sector_t wait_barrier(struct r1conf *conf, struct bio *bio) } if (bio && bio_data_dir(bio) == WRITE) { - if (bio->bi_iter.bi_sector >= - conf->mddev->curr_resync_completed) { + if (bio->bi_iter.bi_sector >= conf->next_resync) { if (conf->start_next_window == MaxSector) conf->start_next_window = conf->next_resync + @@ -1516,7 +1515,7 @@ static void close_sync(struct r1conf *conf) conf->r1buf_pool = NULL; spin_lock_irq(&conf->resync_lock); - conf->next_resync = 0; + conf->next_resync = MaxSector - 2 * NEXT_NORMALIO_DISTANCE; conf->start_next_window = MaxSector; conf->current_window_requests += conf->next_window_requests; @@ -2843,8 +2842,7 @@ static struct r1conf *setup_conf(struct mddev *mddev) abort: if (conf) { - if (conf->r1bio_pool) - mempool_destroy(conf->r1bio_pool); + mempool_destroy(conf->r1bio_pool); kfree(conf->mirrors); safe_put_page(conf->tmppage); kfree(conf->poolinfo); @@ -2946,8 +2944,7 @@ static void raid1_free(struct mddev *mddev, void *priv) { struct r1conf *conf = priv; - if (conf->r1bio_pool) - mempool_destroy(conf->r1bio_pool); + mempool_destroy(conf->r1bio_pool); kfree(conf->mirrors); safe_put_page(conf->tmppage); kfree(conf->poolinfo); |