Re: [PATCH 2/2] mm: introduce vma_set_file function v4
From: Jason Gunthorpe
Date: Fri Oct 16 2020 - 12:13:25 EST
On Mon, Oct 12, 2020 at 10:52:03AM +0200, Christian König wrote:
> Add the new vma_set_file() function to allow changing
> vma->vm_file with the necessary refcount dance.
>
> v2: add more users of this.
> v3: add missing EXPORT_SYMBOL, rebase on mmap cleanup,
> add comments why we drop the reference on two occasions.
> v4: make it clear that changing an anonymous vma is illegal.
>
> Signed-off-by: Christian König <christian.koenig@xxxxxxx>
> Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx> (v2)
> ---
> drivers/dma-buf/dma-buf.c | 3 +--
> drivers/gpu/drm/etnaviv/etnaviv_gem.c | 4 +---
> drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 3 +--
> drivers/gpu/drm/i915/gem/i915_gem_mman.c | 5 +++--
> drivers/gpu/drm/msm/msm_gem.c | 4 +---
> drivers/gpu/drm/omapdrm/omap_gem.c | 3 +--
> drivers/gpu/drm/vgem/vgem_drv.c | 3 +--
> drivers/staging/android/ashmem.c | 6 +++---
> include/linux/mm.h | 2 ++
> mm/mmap.c | 12 ++++++++++++
> 10 files changed, 26 insertions(+), 19 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
Jason