mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
mm: introduce vma_set_file function v5
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. v5: move vma_set_file to mm/util.c Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v2) Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Acked-by: Andrew Morton <akpm@linux-foundation.org> Link: https://patchwork.freedesktop.org/patch/399360/
This commit is contained in:
@@ -2719,6 +2719,8 @@ static inline void vma_set_page_prot(struct vm_area_struct *vma)
|
||||
}
|
||||
#endif
|
||||
|
||||
void vma_set_file(struct vm_area_struct *vma, struct file *file);
|
||||
|
||||
#ifdef CONFIG_NUMA_BALANCING
|
||||
unsigned long change_prot_numa(struct vm_area_struct *vma,
|
||||
unsigned long start, unsigned long end);
|
||||
|
Reference in New Issue
Block a user