aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/videobuf2-memops.c
diff options
context:
space:
mode:
authorYu Tang <ytang5@marvell.com>2011-08-30 01:31:54 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-06 14:05:21 -0400
commit8607c42540d0aa61ab562506681d34c245b91fae (patch)
tree079e39f8b3316063ab6c057bb8429bb95ba086b3 /drivers/media/video/videobuf2-memops.c
parentba7fcb0c954921534707f08ebc4d8beeb2eb17e7 (diff)
[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: Yu Tang <ytang5@marvell.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/videobuf2-memops.c')
-rw-r--r--drivers/media/video/videobuf2-memops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/videobuf2-memops.c b/drivers/media/video/videobuf2-memops.c
index 569eeb3dfd50..71a7a78c3fc0 100644
--- a/drivers/media/video/videobuf2-memops.c
+++ b/drivers/media/video/videobuf2-memops.c
@@ -68,12 +68,12 @@ void vb2_put_vma(struct vm_area_struct *vma)
68 if (!vma) 68 if (!vma)
69 return; 69 return;
70 70
71 if (vma->vm_file)
72 fput(vma->vm_file);
73
74 if (vma->vm_ops && vma->vm_ops->close) 71 if (vma->vm_ops && vma->vm_ops->close)
75 vma->vm_ops->close(vma); 72 vma->vm_ops->close(vma);
76 73
74 if (vma->vm_file)
75 fput(vma->vm_file);
76
77 kfree(vma); 77 kfree(vma);
78} 78}
79EXPORT_SYMBOL_GPL(vb2_put_vma); 79EXPORT_SYMBOL_GPL(vb2_put_vma);