mm: introduce vma_set_file function v4
[linux-2.6-microblaze.git] / drivers / dma-buf / dma-buf.c
index 3d22dff..696b4ce 100644 (file)
@@ -1183,8 +1183,7 @@ int dma_buf_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma,
                return -EINVAL;
 
        /* readjust the vma */
-       fput(vma->vm_file);
-       vma->vm_file = get_file(dmabuf->file);
+       vma_set_file(vma, dmabuf->file);
        vma->vm_pgoff = pgoff;
 
        return dmabuf->ops->mmap(dmabuf, vma);