mm: kill vma flag VM_RESERVED and mm->reserved_vm counter
[deliverable/linux.git] / drivers / gpu / drm / drm_vm.c
index 23a824e6a22ab8a5a067ba857772bc0d7581f85f..db7bd292410bad8e1c2e39539e2ffa5ea730501f 100644 (file)
@@ -514,8 +514,7 @@ static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma)
 
        vma->vm_ops = &drm_vm_dma_ops;
 
-       vma->vm_flags |= VM_RESERVED;   /* Don't swap */
-       vma->vm_flags |= VM_DONTEXPAND;
+       vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
 
        drm_vm_open_locked(dev, vma);
        return 0;
@@ -643,21 +642,16 @@ int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
        case _DRM_SHM:
                vma->vm_ops = &drm_vm_shm_ops;
                vma->vm_private_data = (void *)map;
-               /* Don't let this area swap.  Change when
-                  DRM_KERNEL advisory is supported. */
-               vma->vm_flags |= VM_RESERVED;
                break;
        case _DRM_SCATTER_GATHER:
                vma->vm_ops = &drm_vm_sg_ops;
                vma->vm_private_data = (void *)map;
-               vma->vm_flags |= VM_RESERVED;
                vma->vm_page_prot = drm_dma_prot(map->type, vma);
                break;
        default:
                return -EINVAL; /* This should never happen. */
        }
-       vma->vm_flags |= VM_RESERVED;   /* Don't swap */
-       vma->vm_flags |= VM_DONTEXPAND;
+       vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
 
        drm_vm_open_locked(dev, vma);
        return 0;
This page took 0.026253 seconds and 5 git commands to generate.