summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2020-09-14 15:09:33 +0200
committerChristian König <christian.koenig@amd.com>2020-11-05 13:03:52 +0100
commit2b5b95b1ff3d70a95013a45e3b5b90f1daf42348 (patch)
tree0d0d804862b63c20500e6e947931d18f440dbb45 /include
parent0227da01f2559626396af5f6c7453360db86c1f6 (diff)
downloadlwn-2b5b95b1ff3d70a95013a45e3b5b90f1daf42348.tar.gz
lwn-2b5b95b1ff3d70a95013a45e3b5b90f1daf42348.zip
mm: introduce vma_set_file function v4
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@amd.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v2) Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://patchwork.freedesktop.org/patch/394773/
Diffstat (limited to 'include')
-rw-r--r--include/linux/mm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index ef360fe70aaf..2b7ac36c42dd 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -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);