]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ib_core: make wait_event uninterruptible in ib_flush_fmr_pool()
authorAvinash Repaka <avinash.repaka@oracle.com>
Sat, 30 Jul 2016 00:40:27 +0000 (17:40 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 26 Aug 2016 21:21:06 +0000 (14:21 -0700)
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 <avinash.repaka@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
drivers/infiniband/core/fmr_pool.c

index 2e9e1404c2091dc72d92691306e11957efb3bd9d..ad8e1f0671d8312687c0f1907fc255a3eab0a764 100644 (file)
@@ -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;
 }