[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <41323971-7869-ed09-6181-99a567dc6d7b@gmail.com>
Date: Thu, 8 Oct 2020 14:06:33 +0200
From: Christian König <ckoenig.leichtzumerken@...il.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
linaro-mm-sig@...ts.linaro.org, dri-devel@...ts.freedesktop.org,
linux-media@...r.kernel.org, chris@...is-wilson.co.uk,
airlied@...hat.com, akpm@...ux-foundation.org, daniel@...ll.ch,
sumit.semwal@...aro.org
Subject: Re: [PATCH 1/4] mm: introduce vma_set_file function v2
Am 08.10.20 um 13:39 schrieb Matthew Wilcox:
> On Thu, Oct 08, 2020 at 01:23:39PM +0200, Christian König wrote:
>> drivers/dma-buf/dma-buf.c | 16 +++++-----------
>> 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 | 4 ++--
>> 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 | 5 ++---
> ...
>> +++ b/mm/mmap.c
>> @@ -136,6 +136,22 @@ void vma_set_page_prot(struct vm_area_struct *vma)
>> WRITE_ONCE(vma->vm_page_prot, vm_page_prot);
>> }
>>
>> +/*
>> + * Change backing file, only valid to use during initial VMA setup.
>> + */
>> +struct file *vma_set_file(struct vm_area_struct *vma, struct file *file)
>> +{
>> + if (file)
>> + get_file(file);
>> +
>> + swap(vma->vm_file, file);
>> +
>> + if (file)
>> + fput(file);
>> +
>> + return file;
>> +}
>> +
> These users are all potentially modules. You need an EXPORT_SYMBOL()?
Oh, good point. Yeah I totally missed that. The initial DMA-buf use case
was not inside a module.
Thanks,
Christian.
Powered by blists - more mailing lists