diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-01-13 17:51:39 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-01-13 17:51:39 -0500 |
commit | 95ed644fd12f53c6fc778f3f246974e5fe3a9468 (patch) | |
tree | edf9f57192ad95f9165b3be5dbf1e8e745249ed1 /drivers/infiniband/core/uverbs_main.c | |
parent | 9eacee2ac624bfa9740d49355dbe6ee88d0cba0a (diff) |
IB: convert from semaphores to mutexes
semaphore to mutex conversion by Ingo and Arjan's script.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
[ Sanity-checked on real IB hardware ]
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_main.c')
-rw-r--r-- | drivers/infiniband/core/uverbs_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index 81737bd6fae..96ea79b63df 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c | |||
@@ -66,7 +66,7 @@ enum { | |||
66 | 66 | ||
67 | static struct class *uverbs_class; | 67 | static struct class *uverbs_class; |
68 | 68 | ||
69 | DECLARE_MUTEX(ib_uverbs_idr_mutex); | 69 | DEFINE_MUTEX(ib_uverbs_idr_mutex); |
70 | DEFINE_IDR(ib_uverbs_pd_idr); | 70 | DEFINE_IDR(ib_uverbs_pd_idr); |
71 | DEFINE_IDR(ib_uverbs_mr_idr); | 71 | DEFINE_IDR(ib_uverbs_mr_idr); |
72 | DEFINE_IDR(ib_uverbs_mw_idr); | 72 | DEFINE_IDR(ib_uverbs_mw_idr); |
@@ -180,7 +180,7 @@ static int ib_uverbs_cleanup_ucontext(struct ib_uverbs_file *file, | |||
180 | if (!context) | 180 | if (!context) |
181 | return 0; | 181 | return 0; |
182 | 182 | ||
183 | down(&ib_uverbs_idr_mutex); | 183 | mutex_lock(&ib_uverbs_idr_mutex); |
184 | 184 | ||
185 | list_for_each_entry_safe(uobj, tmp, &context->ah_list, list) { | 185 | list_for_each_entry_safe(uobj, tmp, &context->ah_list, list) { |
186 | struct ib_ah *ah = idr_find(&ib_uverbs_ah_idr, uobj->id); | 186 | struct ib_ah *ah = idr_find(&ib_uverbs_ah_idr, uobj->id); |
@@ -250,7 +250,7 @@ static int ib_uverbs_cleanup_ucontext(struct ib_uverbs_file *file, | |||
250 | kfree(uobj); | 250 | kfree(uobj); |
251 | } | 251 | } |
252 | 252 | ||
253 | up(&ib_uverbs_idr_mutex); | 253 | mutex_unlock(&ib_uverbs_idr_mutex); |
254 | 254 | ||
255 | return context->device->dealloc_ucontext(context); | 255 | return context->device->dealloc_ucontext(context); |
256 | } | 256 | } |
@@ -653,7 +653,7 @@ static int ib_uverbs_open(struct inode *inode, struct file *filp) | |||
653 | file->ucontext = NULL; | 653 | file->ucontext = NULL; |
654 | file->async_file = NULL; | 654 | file->async_file = NULL; |
655 | kref_init(&file->ref); | 655 | kref_init(&file->ref); |
656 | init_MUTEX(&file->mutex); | 656 | mutex_init(&file->mutex); |
657 | 657 | ||
658 | filp->private_data = file; | 658 | filp->private_data = file; |
659 | 659 | ||