diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-22 14:10:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-22 14:10:34 -0400 |
commit | 4beb2584be3cf1d4fc7a222b0f747735da8e3c91 (patch) | |
tree | bd12e3af59bcf46102c53b27acc1911707174f5c /drivers/infiniband/core/umem.c | |
parent | e2f90a9141d9e1a4cd0e79716919a5fa39684ae9 (diff) | |
parent | c8681f14013d3ad2fc4fb4e30cfd4ea548f7a249 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
IB/mlx4: Correct max_srq_wr returned from mlx4_ib_query_device()
IPoIB/cm: Remove dead definition of struct ipoib_cm_id
IPoIB/cm: Fix interoperability when MTU doesn't match
IPoIB/cm: Initialize RX before moving QP to RTR
IB/umem: Fix possible hang on process exit
Diffstat (limited to 'drivers/infiniband/core/umem.c')
-rw-r--r-- | drivers/infiniband/core/umem.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c index b4aec5103c99..d40652a80151 100644 --- a/drivers/infiniband/core/umem.c +++ b/drivers/infiniband/core/umem.c | |||
@@ -225,13 +225,15 @@ void ib_umem_release(struct ib_umem *umem) | |||
225 | * up here and not be able to take the mmap_sem. In that case | 225 | * up here and not be able to take the mmap_sem. In that case |
226 | * we defer the vm_locked accounting to the system workqueue. | 226 | * we defer the vm_locked accounting to the system workqueue. |
227 | */ | 227 | */ |
228 | if (context->closing && !down_write_trylock(&mm->mmap_sem)) { | 228 | if (context->closing) { |
229 | INIT_WORK(&umem->work, ib_umem_account); | 229 | if (!down_write_trylock(&mm->mmap_sem)) { |
230 | umem->mm = mm; | 230 | INIT_WORK(&umem->work, ib_umem_account); |
231 | umem->diff = diff; | 231 | umem->mm = mm; |
232 | 232 | umem->diff = diff; | |
233 | schedule_work(&umem->work); | 233 | |
234 | return; | 234 | schedule_work(&umem->work); |
235 | return; | ||
236 | } | ||
235 | } else | 237 | } else |
236 | down_write(&mm->mmap_sem); | 238 | down_write(&mm->mmap_sem); |
237 | 239 | ||