Commit 8607c425 authored by Yu Tang's avatar Yu Tang Committed by Mauro Carvalho Chehab

[media] media: vb2: fix userptr VMA release seq

Align vb2 user pointer VMA release sequence with munmap.
Do vm_ops->vm_close before release file.
Signed-off-by: default avatarYu Tang <ytang5@marvell.com>
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent ba7fcb0c
......@@ -68,12 +68,12 @@ void vb2_put_vma(struct vm_area_struct *vma)
if (!vma)
return;
if (vma->vm_file)
fput(vma->vm_file);
if (vma->vm_ops && vma->vm_ops->close)
vma->vm_ops->close(vma);
if (vma->vm_file)
fput(vma->vm_file);
kfree(vma);
}
EXPORT_SYMBOL_GPL(vb2_put_vma);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment