summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vgem
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/vgem')
-rw-r--r--drivers/gpu/drm/vgem/vgem_drv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
index ea0eecae5153..fa54a6d1403d 100644
--- a/drivers/gpu/drm/vgem/vgem_drv.c
+++ b/drivers/gpu/drm/vgem/vgem_drv.c
@@ -397,7 +397,8 @@ static int vgem_prime_mmap(struct drm_gem_object *obj,
if (ret)
return ret;
- vma_set_file(vma, obj->filp);
+ fput(vma->vm_file);
+ vma->vm_file = get_file(obj->filp);
vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
vma->vm_page_prot = pgprot_writecombine(vm_get_page_prot(vma->vm_flags));