diff options
Diffstat (limited to 'drivers/char/drm/drm_vm.c')
-rw-r--r-- | drivers/char/drm/drm_vm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c index 3f73aa774c8..0291cd62c69 100644 --- a/drivers/char/drm/drm_vm.c +++ b/drivers/char/drm/drm_vm.c | |||
@@ -188,7 +188,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma) | |||
188 | 188 | ||
189 | map = vma->vm_private_data; | 189 | map = vma->vm_private_data; |
190 | 190 | ||
191 | down(&dev->struct_sem); | 191 | mutex_lock(&dev->struct_mutex); |
192 | for (pt = dev->vmalist, prev = NULL; pt; pt = next) { | 192 | for (pt = dev->vmalist, prev = NULL; pt; pt = next) { |
193 | next = pt->next; | 193 | next = pt->next; |
194 | if (pt->vma->vm_private_data == map) | 194 | if (pt->vma->vm_private_data == map) |
@@ -248,7 +248,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma) | |||
248 | drm_free(map, sizeof(*map), DRM_MEM_MAPS); | 248 | drm_free(map, sizeof(*map), DRM_MEM_MAPS); |
249 | } | 249 | } |
250 | } | 250 | } |
251 | up(&dev->struct_sem); | 251 | mutex_unlock(&dev->struct_mutex); |
252 | } | 252 | } |
253 | 253 | ||
254 | /** | 254 | /** |
@@ -404,12 +404,12 @@ static void drm_vm_open(struct vm_area_struct *vma) | |||
404 | 404 | ||
405 | vma_entry = drm_alloc(sizeof(*vma_entry), DRM_MEM_VMAS); | 405 | vma_entry = drm_alloc(sizeof(*vma_entry), DRM_MEM_VMAS); |
406 | if (vma_entry) { | 406 | if (vma_entry) { |
407 | down(&dev->struct_sem); | 407 | mutex_lock(&dev->struct_mutex); |
408 | vma_entry->vma = vma; | 408 | vma_entry->vma = vma; |
409 | vma_entry->next = dev->vmalist; | 409 | vma_entry->next = dev->vmalist; |
410 | vma_entry->pid = current->pid; | 410 | vma_entry->pid = current->pid; |
411 | dev->vmalist = vma_entry; | 411 | dev->vmalist = vma_entry; |
412 | up(&dev->struct_sem); | 412 | mutex_unlock(&dev->struct_mutex); |
413 | } | 413 | } |
414 | } | 414 | } |
415 | 415 | ||
@@ -431,7 +431,7 @@ static void drm_vm_close(struct vm_area_struct *vma) | |||
431 | vma->vm_start, vma->vm_end - vma->vm_start); | 431 | vma->vm_start, vma->vm_end - vma->vm_start); |
432 | atomic_dec(&dev->vma_count); | 432 | atomic_dec(&dev->vma_count); |
433 | 433 | ||
434 | down(&dev->struct_sem); | 434 | mutex_lock(&dev->struct_mutex); |
435 | for (pt = dev->vmalist, prev = NULL; pt; prev = pt, pt = pt->next) { | 435 | for (pt = dev->vmalist, prev = NULL; pt; prev = pt, pt = pt->next) { |
436 | if (pt->vma == vma) { | 436 | if (pt->vma == vma) { |
437 | if (prev) { | 437 | if (prev) { |
@@ -443,7 +443,7 @@ static void drm_vm_close(struct vm_area_struct *vma) | |||
443 | break; | 443 | break; |
444 | } | 444 | } |
445 | } | 445 | } |
446 | up(&dev->struct_sem); | 446 | mutex_unlock(&dev->struct_mutex); |
447 | } | 447 | } |
448 | 448 | ||
449 | /** | 449 | /** |