lkml.org 
[lkml]   [2020]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/4] mm: introduce vma_set_file function v2
From
Date
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.


\
 
 \ /
  Last update: 2020-10-08 14:07    [W:0.371 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site