X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftarget%2Fbarrier.c;h=4f8c5b3dfdb4d8916fbf257d24ca3c40294836a1;hb=9b0b7264a8d7a6a2abe681d15fefc88c27d20c1e;hp=5b0eff5813d25ffd623a69b16efdf5b60e5b0878;hpb=e8bdd1a48dd8800d1de0f0daf1e2e38b123de091;p=fs%2Flustre-release.git diff --git a/lustre/target/barrier.c b/lustre/target/barrier.c index 5b0eff5..4f8c5b3 100644 --- a/lustre/target/barrier.c +++ b/lustre/target/barrier.c @@ -20,7 +20,7 @@ * GPL HEADER END */ /* - * Copyright (c) 2016, Intel Corporation. + * Copyright (c) 2017, Intel Corporation. * * lustre/target/barrier.c * @@ -199,13 +199,11 @@ static int barrier_freeze(const struct lu_env *env, RETURN(1); if (phase1 && inflight != 0) { - struct l_wait_info lwi = LWI_TIMEOUT(cfs_time_seconds(left), - NULL, NULL); - - rc = l_wait_event(barrier->bi_waitq, - percpu_counter_sum(&barrier->bi_writers) == 0, - &lwi); - if (rc) + rc = wait_event_idle_timeout( + barrier->bi_waitq, + percpu_counter_sum(&barrier->bi_writers) == 0, + cfs_time_seconds(left)); + if (rc <= 0) RETURN(1); /* sync again after all inflight modifications done. */ @@ -274,7 +272,7 @@ void barrier_exit(struct dt_device *key) smp_mb(); if (unlikely(barrier->bi_status == BS_FREEZING_P1)) - wake_up_all(&barrier->bi_waitq); + wake_up(&barrier->bi_waitq); barrier_instance_put(barrier); } }