Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87161
b: refs/heads/master
c: 3315529
h: refs/heads/master
i:
  87159: 227a606
v: v3
  • Loading branch information
Pete Wyckoff authored and Roland Dreier committed Feb 29, 2008
1 parent 9d69f3c commit cc5fcf6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 35fb5340e3de5dff86923eb0cded748c3a6e05e7
refs/heads/master: 331552925d17ffa2f5c676e282d4fd37c852d9e3
17 changes: 16 additions & 1 deletion trunk/drivers/infiniband/core/fmr_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,23 @@ EXPORT_SYMBOL(ib_destroy_fmr_pool);
*/
int ib_flush_fmr_pool(struct ib_fmr_pool *pool)
{
int serial = atomic_inc_return(&pool->req_ser);
int serial;
struct ib_pool_fmr *fmr, *next;

/*
* The free_list holds FMRs that may have been used
* but have not been remapped enough times to be dirty.
* Put them on the dirty list now so that the cleanup
* thread will reap them too.
*/
spin_lock_irq(&pool->pool_lock);
list_for_each_entry_safe(fmr, next, &pool->free_list, list) {
if (fmr->remap_count > 0)
list_move(&fmr->list, &pool->dirty_list);
}
spin_unlock_irq(&pool->pool_lock);

serial = atomic_inc_return(&pool->req_ser);
wake_up_process(pool->thread);

if (wait_event_interruptible(pool->force_wait,
Expand Down

0 comments on commit cc5fcf6

Please sign in to comment.