drm: drop setting vm_file to filp
authorDave Airlie <airlied@redhat.com>
Thu, 23 Feb 2012 11:37:26 +0000 (11:37 +0000)
committerDave Airlie <airlied@redhat.com>
Mon, 5 Mar 2012 11:19:08 +0000 (11:19 +0000)
Talking to Al Viro on irc, we can see no possible reason for doing
this, the upper mmap code does it. The code has been there since
first import into drm tree I can find.

Al tracked down this as a requirement pre 2.3.51 hasn't been needed since.

Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_gem.c
drivers/gpu/drm/drm_vm.c
drivers/gpu/drm/exynos/exynos_drm_gem.c
drivers/gpu/drm/i810/i810_dma.c

index f8625e2907288f590552183ff579a9c7aa756d40..3ebe3c8f58b599cb82994369904c81b3180dbf74 100644 (file)
@@ -700,7 +700,6 @@ int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
         */
        drm_gem_object_reference(obj);
 
-       vma->vm_file = filp;    /* Needed for drm_vm_open() */
        drm_vm_open_locked(vma);
 
 out_unlock:
index 8c03eaf414486c9590c830d2e551369406afff84..55cd615678125a2c6f8b3c64fed35b499c0e8192 100644 (file)
@@ -519,7 +519,6 @@ static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma)
        vma->vm_flags |= VM_RESERVED;   /* Don't swap */
        vma->vm_flags |= VM_DONTEXPAND;
 
-       vma->vm_file = filp;    /* Needed for drm_vm_open() */
        drm_vm_open_locked(vma);
        return 0;
 }
@@ -671,7 +670,6 @@ int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
        vma->vm_flags |= VM_RESERVED;   /* Don't swap */
        vma->vm_flags |= VM_DONTEXPAND;
 
-       vma->vm_file = filp;    /* Needed for drm_vm_open() */
        drm_vm_open_locked(vma);
        return 0;
 }
index 025abb3e3b67906948c1c68cf684333d915d9d75..65452512f5b4d70ddb3beb748e5e564a53780424 100644 (file)
@@ -208,7 +208,6 @@ static int exynos_drm_gem_mmap_buffer(struct file *filp,
 
        /* in case of direct mapping, always having non-cachable attribute */
        vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
-       vma->vm_file = filp;
 
        vm_size = vma->vm_end - vma->vm_start;
        /*
index 64a989ed5b8ff93beddeca17baeda427f9a212ca..2c8a60c3b98eacdbeac6673e75f763dff8e065da 100644 (file)
@@ -99,7 +99,6 @@ static int i810_mmap_buffers(struct file *filp, struct vm_area_struct *vma)
        buf_priv = buf->dev_private;
 
        vma->vm_flags |= (VM_IO | VM_DONTCOPY);
-       vma->vm_file = filp;
 
        buf_priv->currently_mapped = I810_BUF_MAPPED;