summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gem/i915_gem_mman.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2020-11-05 17:05:35 +0100
committerChristian König <christian.koenig@amd.com>2020-11-05 17:08:43 +0100
commite40b0b56ffdc16edce207904a7782da6a1a47162 (patch)
tree53dfe71f25c1525d5b52474ec9d18460c2cc66fc /drivers/gpu/drm/i915/gem/i915_gem_mman.c
parent00efd65a65968fddd9816315ce190c1fa3bfcd29 (diff)
Revert "mm: introduce vma_set_file function v4"
The kernel test robot is not happy with that. This reverts commit 2b5b95b1ff3d70a95013a45e3b5b90f1daf42348. Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/394773/
Diffstat (limited to 'drivers/gpu/drm/i915/gem/i915_gem_mman.c')
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_mman.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index ec28a6cde49b..3d69e51f3e4d 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -893,9 +893,8 @@ int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma)
* requires avoiding extraneous references to their filp, hence why
* we prefer to use an anonymous file for their mmaps.
*/
- vma_set_file(vma, anon);
- /* Drop the initial creation reference, the vma is now holding one. */
- fput(anon);
+ fput(vma->vm_file);
+ vma->vm_file = anon;
switch (mmo->mmap_type) {
case I915_MMAP_TYPE_WC: