linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	linaro-mm-sig@lists.linaro.org, dri-devel@lists.freedesktop.org,
	linux-media@vger.kernel.org, chris@chris-wilson.co.uk,
	airlied@redhat.com, akpm@linux-foundation.org, daniel@ffwll.ch,
	sumit.semwal@linaro.org
Subject: Re: [PATCH 1/4] mm: introduce vma_set_file function v2
Date: Thu, 8 Oct 2020 14:06:33 +0200	[thread overview]
Message-ID: <41323971-7869-ed09-6181-99a567dc6d7b@gmail.com> (raw)
In-Reply-To: <20201008113937.GB20115@casper.infradead.org>

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.



  reply	other threads:[~2020-10-08 12:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08 11:23 [PATCH 1/4] mm: introduce vma_set_file function v2 Christian König
2020-10-08 11:23 ` [PATCH 2/4] drm/prime: document that use the page array is deprecated Christian König
2020-10-08 14:09   ` Daniel Vetter
2020-10-08 14:14     ` Daniel Vetter
2020-10-09  7:36       ` Christian König
2020-10-09  7:40         ` Daniel Vetter
2020-10-08 11:23 ` [PATCH 3/4] drm/radeon: stop using pages with drm_prime_sg_to_page_addr_arrays Christian König
2020-10-08 11:23 ` [PATCH 4/4] drm/amdgpu: " Christian König
2020-10-08 11:39 ` [PATCH 1/4] mm: introduce vma_set_file function v2 Matthew Wilcox
2020-10-08 12:06   ` Christian König [this message]
2020-10-08 14:12 ` Daniel Vetter
2020-10-09  7:16   ` Christian König
2020-10-09  7:39     ` Daniel Vetter
2020-10-09 12:12       ` Jason Gunthorpe
2020-10-09 12:15         ` Christian König
2020-10-08 15:35 ` kernel test robot
2020-10-08 16:19 ` kernel test robot
2020-10-08 21:49 ` John Hubbard
2020-10-09  7:33   ` Christian König
2020-10-09  7:36     ` John Hubbard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41323971-7869-ed09-6181-99a567dc6d7b@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=airlied@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sumit.semwal@linaro.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).