aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r--drivers/md/raid1.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index a0f73092176e..d5bddfc4010e 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -822,7 +822,7 @@ static void raise_barrier(struct r1conf *conf)
822 822
823 /* Wait until no block IO is waiting */ 823 /* Wait until no block IO is waiting */
824 wait_event_lock_irq(conf->wait_barrier, !conf->nr_waiting, 824 wait_event_lock_irq(conf->wait_barrier, !conf->nr_waiting,
825 conf->resync_lock, ); 825 conf->resync_lock);
826 826
827 /* block any new IO from starting */ 827 /* block any new IO from starting */
828 conf->barrier++; 828 conf->barrier++;
@@ -830,7 +830,7 @@ static void raise_barrier(struct r1conf *conf)
830 /* Now wait for all pending IO to complete */ 830 /* Now wait for all pending IO to complete */
831 wait_event_lock_irq(conf->wait_barrier, 831 wait_event_lock_irq(conf->wait_barrier,
832 !conf->nr_pending && conf->barrier < RESYNC_DEPTH, 832 !conf->nr_pending && conf->barrier < RESYNC_DEPTH,
833 conf->resync_lock, ); 833 conf->resync_lock);
834 834
835 spin_unlock_irq(&conf->resync_lock); 835 spin_unlock_irq(&conf->resync_lock);
836} 836}
@@ -864,8 +864,7 @@ static void wait_barrier(struct r1conf *conf)
864 (conf->nr_pending && 864 (conf->nr_pending &&
865 current->bio_list && 865 current->bio_list &&
866 !bio_list_empty(current->bio_list)), 866 !bio_list_empty(current->bio_list)),
867 conf->resync_lock, 867 conf->resync_lock);
868 );
869 conf->nr_waiting--; 868 conf->nr_waiting--;
870 } 869 }
871 conf->nr_pending++; 870 conf->nr_pending++;
@@ -898,10 +897,10 @@ static void freeze_array(struct r1conf *conf)
898 spin_lock_irq(&conf->resync_lock); 897 spin_lock_irq(&conf->resync_lock);
899 conf->barrier++; 898 conf->barrier++;
900 conf->nr_waiting++; 899 conf->nr_waiting++;
901 wait_event_lock_irq(conf->wait_barrier, 900 wait_event_lock_irq_cmd(conf->wait_barrier,
902 conf->nr_pending == conf->nr_queued+1, 901 conf->nr_pending == conf->nr_queued+1,
903 conf->resync_lock, 902 conf->resync_lock,
904 flush_pending_writes(conf)); 903 flush_pending_writes(conf));
905 spin_unlock_irq(&conf->resync_lock); 904 spin_unlock_irq(&conf->resync_lock);
906} 905}
907static void unfreeze_array(struct r1conf *conf) 906static void unfreeze_array(struct r1conf *conf)