Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm/vma: remove unused function, make internal functions static

unlink_file_vma() is not used by anything, so remove it.

vma_link() and vma_link_file() are only used within mm/vma.c, so make them
static.

Link: https://lkml.kernel.org/r/f2ab9ea051225a02e6d1d45a7608f4e149220117.1760959442.git.lorenzo.stoakes@oracle.com
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Chatre, Reinette <reinette.chatre@intel.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Dave Martin <dave.martin@arm.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Dmitriy Vyukov <dvyukov@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guo Ren <guoren@kernel.org>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: James Morse <james.morse@arm.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Jann Horn <jannh@google.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kevin Tian <kevin.tian@intel.com>
Cc: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Pedro Falcato <pfalcato@suse.de>
Cc: Robin Murohy <robin.murphy@arm.com>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Lorenzo Stoakes and committed by
Andrew Morton
cf1d98f4 8e18a7f4

+2 -25
+2 -19
mm/vma.c
··· 1754 1754 unlink_file_vma_batch_process(vb); 1755 1755 } 1756 1756 1757 - /* 1758 - * Unlink a file-based vm structure from its interval tree, to hide 1759 - * vma from rmap and vmtruncate before freeing its page tables. 1760 - */ 1761 - void unlink_file_vma(struct vm_area_struct *vma) 1762 - { 1763 - struct file *file = vma->vm_file; 1764 - 1765 - if (file) { 1766 - struct address_space *mapping = file->f_mapping; 1767 - 1768 - i_mmap_lock_write(mapping); 1769 - __remove_shared_vm_struct(vma, mapping); 1770 - i_mmap_unlock_write(mapping); 1771 - } 1772 - } 1773 - 1774 - void vma_link_file(struct vm_area_struct *vma) 1757 + static void vma_link_file(struct vm_area_struct *vma) 1775 1758 { 1776 1759 struct file *file = vma->vm_file; 1777 1760 struct address_space *mapping; ··· 1767 1784 } 1768 1785 } 1769 1786 1770 - int vma_link(struct mm_struct *mm, struct vm_area_struct *vma) 1787 + static int vma_link(struct mm_struct *mm, struct vm_area_struct *vma) 1771 1788 { 1772 1789 VMA_ITERATOR(vmi, mm, 0); 1773 1790
-6
mm/vma.h
··· 312 312 void unlink_file_vma_batch_add(struct unlink_vma_file_batch *vb, 313 313 struct vm_area_struct *vma); 314 314 315 - void unlink_file_vma(struct vm_area_struct *vma); 316 - 317 - void vma_link_file(struct vm_area_struct *vma); 318 - 319 - int vma_link(struct mm_struct *mm, struct vm_area_struct *vma); 320 - 321 315 struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, 322 316 unsigned long addr, unsigned long len, pgoff_t pgoff, 323 317 bool *need_rmap_locks);