summaryrefslogtreecommitdiff
path: root/linux-core/drm_vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/drm_vm.c')
-rw-r--r--linux-core/drm_vm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c
index 19866dca..cf3bc3cf 100644
--- a/linux-core/drm_vm.c
+++ b/linux-core/drm_vm.c
@@ -187,7 +187,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)
map = vma->vm_private_data;
- down(&dev->struct_sem);
+ mutex_lock(&dev->struct_mutex);
for (pt = dev->vmalist, prev = NULL; pt; pt = next) {
next = pt->next;
if (pt->vma->vm_private_data == map)
@@ -247,7 +247,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)
drm_free(map, sizeof(*map), DRM_MEM_MAPS);
}
}
- up(&dev->struct_sem);
+ mutex_unlock(&dev->struct_mutex);
}
/**
@@ -434,12 +434,12 @@ static void drm_vm_open(struct vm_area_struct *vma)
vma_entry = drm_alloc(sizeof(*vma_entry), DRM_MEM_VMAS);
if (vma_entry) {
- down(&dev->struct_sem);
+ mutex_lock(&dev->struct_mutex);
vma_entry->vma = vma;
vma_entry->next = dev->vmalist;
vma_entry->pid = current->pid;
dev->vmalist = vma_entry;
- up(&dev->struct_sem);
+ mutex_unlock(&dev->struct_mutex);
}
}
@@ -461,7 +461,7 @@ static void drm_vm_close(struct vm_area_struct *vma)
vma->vm_start, vma->vm_end - vma->vm_start);
atomic_dec(&dev->vma_count);
- down(&dev->struct_sem);
+ mutex_lock(&dev->struct_mutex);
for (pt = dev->vmalist, prev = NULL; pt; prev = pt, pt = pt->next) {
if (pt->vma == vma) {
if (prev) {
@@ -473,7 +473,7 @@ static void drm_vm_close(struct vm_area_struct *vma)
break;
}
}
- up(&dev->struct_sem);
+ mutex_unlock(&dev->struct_mutex);
}
/**