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: document vm_operations_struct->open the same as close()

Describe when the operation is invoked and the context in which it is
invoked, matching the description already added for vm_op->close().

While we're here, update all outdated references to an 'area' field for
VMAs to the more consistent 'vma'.

Link: https://lkml.kernel.org/r/7d0ca833c12014320f0fa00f816f95e6e10076f2.1774045440.git.ljs@kernel.org
Signed-off-by: Lorenzo Stoakes (Oracle) <ljs@kernel.org>
Acked-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Bodo Stroesser <bostroesser@gmail.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Clemens Ladisch <clemens@ladisch.de>
Cc: David Hildenbrand <david@kernel.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Dexuan Cui <decui@microsoft.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Jann Horn <jannh@google.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Long Li <longli@microsoft.com>
Cc: Marc Dionne <marc.dionne@auristor.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Pedro Falcato <pfalcato@suse.de>
Cc: Richard Weinberger <richard@nod.at>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Cc: Wei Liu <wei.liu@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Lorenzo Stoakes (Oracle) and committed by
Andrew Morton
827e97cf fdd24784

+20 -10
+10 -5
include/linux/mm.h
··· 764 764 * to the functions called when a no-page or a wp-page exception occurs. 765 765 */ 766 766 struct vm_operations_struct { 767 - void (*open)(struct vm_area_struct * area); 767 + /** 768 + * @open: Called when a VMA is remapped, split or forked. Not called 769 + * upon first mapping a VMA. 770 + * Context: User context. May sleep. Caller holds mmap_lock. 771 + */ 772 + void (*open)(struct vm_area_struct *vma); 768 773 /** 769 774 * @close: Called when the VMA is being removed from the MM. 770 775 * Context: User context. May sleep. Caller holds mmap_lock. 771 776 */ 772 - void (*close)(struct vm_area_struct * area); 777 + void (*close)(struct vm_area_struct *vma); 773 778 /* Called any time before splitting to check if it's allowed */ 774 - int (*may_split)(struct vm_area_struct *area, unsigned long addr); 775 - int (*mremap)(struct vm_area_struct *area); 779 + int (*may_split)(struct vm_area_struct *vma, unsigned long addr); 780 + int (*mremap)(struct vm_area_struct *vma); 776 781 /* 777 782 * Called by mprotect() to make driver-specific permission 778 783 * checks before mprotect() is finalised. The VMA must not ··· 789 784 vm_fault_t (*huge_fault)(struct vm_fault *vmf, unsigned int order); 790 785 vm_fault_t (*map_pages)(struct vm_fault *vmf, 791 786 pgoff_t start_pgoff, pgoff_t end_pgoff); 792 - unsigned long (*pagesize)(struct vm_area_struct * area); 787 + unsigned long (*pagesize)(struct vm_area_struct *vma); 793 788 794 789 /* notification that a previously read-only page is about to become 795 790 * writable, if an error is returned it will cause a SIGBUS */
+10 -5
tools/testing/vma/include/dup.h
··· 632 632 } __randomize_layout; 633 633 634 634 struct vm_operations_struct { 635 - void (*open)(struct vm_area_struct * area); 635 + /** 636 + * @open: Called when a VMA is remapped, split or forked. Not called 637 + * upon first mapping a VMA. 638 + * Context: User context. May sleep. Caller holds mmap_lock. 639 + */ 640 + void (*open)(struct vm_area_struct *vma); 636 641 /** 637 642 * @close: Called when the VMA is being removed from the MM. 638 643 * Context: User context. May sleep. Caller holds mmap_lock. 639 644 */ 640 - void (*close)(struct vm_area_struct * area); 645 + void (*close)(struct vm_area_struct *vma); 641 646 /* Called any time before splitting to check if it's allowed */ 642 - int (*may_split)(struct vm_area_struct *area, unsigned long addr); 643 - int (*mremap)(struct vm_area_struct *area); 647 + int (*may_split)(struct vm_area_struct *vma, unsigned long addr); 648 + int (*mremap)(struct vm_area_struct *vma); 644 649 /* 645 650 * Called by mprotect() to make driver-specific permission 646 651 * checks before mprotect() is finalised. The VMA must not ··· 657 652 vm_fault_t (*huge_fault)(struct vm_fault *vmf, unsigned int order); 658 653 vm_fault_t (*map_pages)(struct vm_fault *vmf, 659 654 pgoff_t start_pgoff, pgoff_t end_pgoff); 660 - unsigned long (*pagesize)(struct vm_area_struct * area); 655 + unsigned long (*pagesize)(struct vm_area_struct *vma); 661 656 662 657 /* notification that a previously read-only page is about to become 663 658 * writable, if an error is returned it will cause a SIGBUS */