From 2fcb703df519414bf5241d48eca0f36d335eef9d Mon Sep 17 00:00:00 2001 From: Avinash Repaka Date: Fri, 29 Jul 2016 17:40:27 -0700 Subject: [PATCH] ib_core: make wait_event uninterruptible in ib_flush_fmr_pool() Replace wait_event_interruptible() with wait_event() in ib_flush_fmr_pool() to avoid deallocating pd before fmr_cleanup_thread tears down pool of fmrs. Orabug: 24533036 Signed-off-by: Avinash Repaka Acked-by: Santosh Shilimkar --- drivers/infiniband/core/fmr_pool.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/core/fmr_pool.c b/drivers/infiniband/core/fmr_pool.c index 2e9e1404c209..ad8e1f0671d8 100644 --- a/drivers/infiniband/core/fmr_pool.c +++ b/drivers/infiniband/core/fmr_pool.c @@ -283,7 +283,7 @@ static int ib_fmr_cleanup_thread(void *pool_ptr) time_left = 1; atomic_inc(&pool->flush_ser); - wake_up_interruptible(&pool->force_wait); + wake_up(&pool->force_wait); if (pool->flush_function) pool->flush_function(pool, pool->flush_arg); @@ -548,9 +548,7 @@ int ib_flush_fmr_pool(struct ib_fmr_pool *pool) serial = atomic_inc_return(&pool->req_ser); wake_up_process(pool->thread); - if (wait_event_interruptible(pool->force_wait, - atomic_read(&pool->flush_ser) - serial >= 0)) - return -EINTR; + wait_event(pool->force_wait, atomic_read(&pool->flush_ser) - serial >= 0); return 0; } -- 2.50.1