]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mm: fix minor spelling mistakes in comments
authorKevin Lourenco <klourencodev@gmail.com>
Thu, 18 Dec 2025 15:09:06 +0000 (16:09 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 21 Jan 2026 03:24:48 +0000 (19:24 -0800)
Correct several typos in comments across files in mm/

[akpm@linux-foundation.org: also fix comment grammar, per SeongJae]
Link: https://lkml.kernel.org/r/20251218150906.25042-1-klourencodev@gmail.com
Signed-off-by: Kevin Lourenco <klourencodev@gmail.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Acked-by: David Hildenbrand (Red Hat) <david@kernel.org>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
27 files changed:
mm/internal.h
mm/madvise.c
mm/memblock.c
mm/memcontrol.c
mm/memory-failure.c
mm/memory-tiers.c
mm/memory.c
mm/memory_hotplug.c
mm/migrate_device.c
mm/mm_init.c
mm/mremap.c
mm/mseal.c
mm/numa_memblks.c
mm/page_alloc.c
mm/page_io.c
mm/page_isolation.c
mm/page_reporting.c
mm/swap.c
mm/swap.h
mm/swap_state.c
mm/swapfile.c
mm/userfaultfd.c
mm/vma.c
mm/vma.h
mm/vmscan.c
mm/vmstat.c
mm/zsmalloc.c

index f35dbcf99a86b0749c1a33aa61fb898c4488d453..9ee336aa03656b08ccccd0f665550ee3f9eea245 100644 (file)
@@ -171,7 +171,7 @@ static inline int mmap_file(struct file *file, struct vm_area_struct *vma)
 
        /*
         * OK, we tried to call the file hook for mmap(), but an error
-        * arose. The mapping is in an inconsistent state and we most not invoke
+        * arose. The mapping is in an inconsistent state and we must not invoke
         * any further hooks on it.
         */
        vma->vm_ops = &vma_dummy_vm_ops;
index 6bf7009fa5cedfc2dd6605a571ebf4c9114b711d..863d55b8a6580d4aa93b93ca83e42dbb53f5f4b0 100644 (file)
@@ -1867,7 +1867,7 @@ static bool is_valid_madvise(unsigned long start, size_t len_in, int behavior)
  * madvise_should_skip() - Return if the request is invalid or nothing.
  * @start:     Start address of madvise-requested address range.
  * @len_in:    Length of madvise-requested address range.
- * @behavior:  Requested madvise behavor.
+ * @behavior:  Requested madvise behavior.
  * @err:       Pointer to store an error code from the check.
  *
  * If the specified behaviour is invalid or nothing would occur, we skip the
index 905d06b16348af482f47476467dfb7629918f31f..e76255e4ff367f40618dd181b726f25f73f9f287 100644 (file)
@@ -773,7 +773,7 @@ bool __init_memblock memblock_validate_numa_coverage(unsigned long threshold_byt
        unsigned long start_pfn, end_pfn, mem_size_mb;
        int nid, i;
 
-       /* calculate lose page */
+       /* calculate lost page */
        for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, &nid) {
                if (!numa_valid_node(nid))
                        nr_pages += end_pfn - start_pfn;
@@ -2414,7 +2414,7 @@ EXPORT_SYMBOL_GPL(reserve_mem_find_by_name);
 
 /**
  * reserve_mem_release_by_name - Release reserved memory region with a given name
- * @name: The name that is attatched to a reserved memory region
+ * @name: The name that is attached to a reserved memory region
  *
  * Forcibly release the pages in the reserved memory region so that those memory
  * can be used as free memory. After released the reserved region size becomes 0.
index a01d3e6c157dfe6b046bc32d63d2239ca4738c4e..75fc22a33b28df472515ee0d2ef456cdb6f5b7e4 100644 (file)
@@ -4976,7 +4976,7 @@ void mem_cgroup_migrate(struct folio *old, struct folio *new)
        memcg = folio_memcg(old);
        /*
         * Note that it is normal to see !memcg for a hugetlb folio.
-        * For e.g, itt could have been allocated when memory_hugetlb_accounting
+        * For e.g, it could have been allocated when memory_hugetlb_accounting
         * was not selected.
         */
        VM_WARN_ON_ONCE_FOLIO(!folio_test_hugetlb(old) && !memcg, old);
index c80c2907da3332e0210da7bbb1888634b2afd280..05a553b069ff4655ac6291f3f848f6a6571c4ca0 100644 (file)
@@ -864,7 +864,7 @@ static int kill_accessing_process(struct task_struct *p, unsigned long pfn,
  *
  * MF_RECOVERED - The m-f() handler marks the page as PG_hwpoisoned'ed.
  * The page has been completely isolated, that is, unmapped, taken out of
- * the buddy system, or hole-punnched out of the file mapping.
+ * the buddy system, or hole-punched out of the file mapping.
  */
 static const char *action_name[] = {
        [MF_IGNORED] = "Ignored",
index 864811fff4093f664b9f48affbbc80c3410b4dfd..20aab9c19c5e578ca689e8a48a475999386e77cc 100644 (file)
@@ -648,7 +648,7 @@ void clear_node_memory_type(int node, struct memory_dev_type *memtype)
        if (node_memory_types[node].memtype == memtype || !memtype)
                node_memory_types[node].map_count--;
        /*
-        * If we umapped all the attached devices to this node,
+        * If we unmapped all the attached devices to this node,
         * clear the node memory type.
         */
        if (!node_memory_types[node].map_count) {
index ce933ee4a3ddc7e7bae376a579307c98d745c88d..87cf4e1a6f8662af3598996043c13244d489fd1f 100644 (file)
@@ -5935,7 +5935,7 @@ int numa_migrate_check(struct folio *folio, struct vm_fault *vmf,
        else
                *last_cpupid = folio_last_cpupid(folio);
 
-       /* Record the current PID acceesing VMA */
+       /* Record the current PID accessing VMA */
        vma_set_access_pid_bit(vma);
 
        count_vm_numa_event(NUMA_HINT_FAULTS);
@@ -6254,7 +6254,7 @@ static vm_fault_t handle_pte_fault(struct vm_fault *vmf)
                 * Use the maywrite version to indicate that vmf->pte may be
                 * modified, but since we will use pte_same() to detect the
                 * change of the !pte_none() entry, there is no need to recheck
-                * the pmdval. Here we chooes to pass a dummy variable instead
+                * the pmdval. Here we choose to pass a dummy variable instead
                 * of NULL, which helps new user think about why this place is
                 * special.
                 */
index a63ec679d861410c0c94b8b3af32d15934801ffb..389989a28abe06481e90cf324e348de9d4ab3c75 100644 (file)
@@ -926,7 +926,7 @@ static struct zone *default_kernel_zone_for_pfn(int nid, unsigned long start_pfn
  *
  *   MOVABLE : KERNEL_EARLY
  *
- * Whereby KERNEL_EARLY is memory in one of the kernel zones, available sinze
+ * Whereby KERNEL_EARLY is memory in one of the kernel zones, available since
  * boot. We base our calculation on KERNEL_EARLY internally, because:
  *
  * a) Hotplugged memory in one of the kernel zones can sometimes still get
@@ -1258,7 +1258,7 @@ static pg_data_t *hotadd_init_pgdat(int nid)
         * NODE_DATA is preallocated (free_area_init) but its internal
         * state is not allocated completely. Add missing pieces.
         * Completely offline nodes stay around and they just need
-        * reintialization.
+        * reinitialization.
         */
        pgdat = NODE_DATA(nid);
 
index 0346c2d7819f6f1e6d4d29d5d7990bb4ae577461..0a8b31939640f0fdd7b902b9932c5f4ce8db7e9d 100644 (file)
@@ -1419,10 +1419,10 @@ EXPORT_SYMBOL(migrate_device_range);
 
 /**
  * migrate_device_pfns() - migrate device private pfns to normal memory.
- * @src_pfns: pre-popluated array of source device private pfns to migrate.
+ * @src_pfns: pre-populated array of source device private pfns to migrate.
  * @npages: number of pages to migrate.
  *
- * Similar to migrate_device_range() but supports non-contiguous pre-popluated
+ * Similar to migrate_device_range() but supports non-contiguous pre-populated
  * array of device pages to migrate.
  */
 int migrate_device_pfns(unsigned long *src_pfns, unsigned long npages)
index d86248566a56baac9ac95d1ab2805d0cabafe56f..0927bedb12549c042dc3161552bfb27b46dc5105 100644 (file)
@@ -187,7 +187,7 @@ void mm_compute_batch(int overcommit_policy)
        /*
         * For policy OVERCOMMIT_NEVER, set batch size to 0.4% of
         * (total memory/#cpus), and lift it to 25% for other policies
-        * to easy the possible lock contention for percpu_counter
+        * to ease the possible lock contention for percpu_counter
         * vm_committed_as, while the max limit is INT_MAX
         */
        if (overcommit_policy == OVERCOMMIT_NEVER)
@@ -1745,7 +1745,7 @@ static void __init free_area_init_node(int nid)
        lru_gen_init_pgdat(pgdat);
 }
 
-/* Any regular or high memory on that node ? */
+/* Any regular or high memory on that node? */
 static void __init check_for_memory(pg_data_t *pgdat)
 {
        enum zone_type zone_type;
@@ -2045,7 +2045,7 @@ static unsigned long __init deferred_init_pages(struct zone *zone,
  * Initialize and free pages.
  *
  * At this point reserved pages and struct pages that correspond to holes in
- * memblock.memory are already intialized so every free range has a valid
+ * memblock.memory are already initialized so every free range has a valid
  * memory map around it.
  * This ensures that access of pages that are ahead of the range being
  * initialized (computing buddy page in __free_one_page()) always reads a valid
index 8275b9772ec1df903a77f1e300da507b4ddf1a83..8391ae17de645d10d8447b02a76ad735c73b406c 100644 (file)
@@ -678,7 +678,7 @@ static bool can_realign_addr(struct pagetable_move_control *pmc,
        /*
         * We don't want to have to go hunting for VMAs from the end of the old
         * VMA to the next page table boundary, also we want to make sure the
-        * operation is wortwhile.
+        * operation is worthwhile.
         *
         * So ensure that we only perform this realignment if the end of the
         * range being copied reaches or crosses the page table boundary.
@@ -926,7 +926,7 @@ static bool vrm_overlaps(struct vma_remap_struct *vrm)
 /*
  * Will a new address definitely be assigned? This either if the user specifies
  * it via MREMAP_FIXED, or if MREMAP_DONTUNMAP is used, indicating we will
- * always detemrine a target address.
+ * always determine a target address.
  */
 static bool vrm_implies_new_addr(struct vma_remap_struct *vrm)
 {
@@ -1806,7 +1806,7 @@ static unsigned long check_mremap_params(struct vma_remap_struct *vrm)
        /*
         * move_vma() need us to stay 4 maps below the threshold, otherwise
         * it will bail out at the very beginning.
-        * That is a problem if we have already unmaped the regions here
+        * That is a problem if we have already unmapped the regions here
         * (new_addr, and old_addr), because userspace will not know the
         * state of the vma's after it gets -ENOMEM.
         * So, to avoid such scenario we can pre-compute if the whole
index ae442683c5c0dd2aaae95fc019618dee31932c47..316b5e1dec7818ed48446cbae3042d0ade341070 100644 (file)
@@ -21,7 +21,7 @@
  * It disallows unmapped regions from start to end whether they exist at the
  * start, in the middle, or at the end of the range, or any combination thereof.
  *
- * This is because after sealng a range, there's nothing to stop memory mapping
+ * This is because after sealing a range, there's nothing to stop memory mapping
  * of ranges in the remaining gaps later, meaning that the user might then
  * wrongly consider the entirety of the mseal()'d range to be sealed when it
  * in fact isn't.
@@ -124,7 +124,7 @@ static int mseal_apply(struct mm_struct *mm,
  *  -EINVAL:
  *   invalid input flags.
  *   start address is not page aligned.
- *   Address arange (start + len) overflow.
+ *   Address range (start + len) overflow.
  *  -ENOMEM:
  *   addr is not a valid address (not allocated).
  *   end (start + len) is not a valid address.
index 8f5735fda0a2180ba7c7eae5f1c6e26a08c9b993..391f53e63ea34a3093ed15c08620d4df380cff90 100644 (file)
@@ -467,7 +467,7 @@ int __init numa_memblks_init(int (*init_func)(void),
         * We reset memblock back to the top-down direction
         * here because if we configured ACPI_NUMA, we have
         * parsed SRAT in init_func(). It is ok to have the
-        * reset here even if we did't configure ACPI_NUMA
+        * reset here even if we didn't configure ACPI_NUMA
         * or acpi numa init fails and fallbacks to dummy
         * numa init.
         */
index cbf758e27aa2c3d4e642040d52730bb5ea7a2d98..e1cc0c9ed947952370ee97e2ee188746a56f2173 100644 (file)
@@ -1853,7 +1853,7 @@ inline void post_alloc_hook(struct page *page, unsigned int order,
 
        /*
         * As memory initialization might be integrated into KASAN,
-        * KASAN unpoisoning and memory initializion code must be
+        * KASAN unpoisoning and memory initialization code must be
         * kept together to avoid discrepancies in behavior.
         */
 
@@ -7653,7 +7653,7 @@ struct page *alloc_frozen_pages_nolock_noprof(gfp_t gfp_flags, int nid, unsigned
         * unsafe in NMI. If spin_trylock() is called from hard IRQ the current
         * task may be waiting for one rt_spin_lock, but rt_spin_trylock() will
         * mark the task as the owner of another rt_spin_lock which will
-        * confuse PI logic, so return immediately if called form hard IRQ or
+        * confuse PI logic, so return immediately if called from hard IRQ or
         * NMI.
         *
         * Note, irqs_disabled() case is ok. This function can be called
index 3c342db77ce38ed26bc7aec68651270bbe0e2564..a2c034660c805ffb715e89979dc51af38d1179c3 100644 (file)
@@ -450,14 +450,14 @@ void __swap_writepage(struct folio *folio, struct swap_iocb **swap_plug)
 
        VM_BUG_ON_FOLIO(!folio_test_swapcache(folio), folio);
        /*
-        * ->flags can be updated non-atomicially (scan_swap_map_slots),
+        * ->flags can be updated non-atomically (scan_swap_map_slots),
         * but that will never affect SWP_FS_OPS, so the data_race
         * is safe.
         */
        if (data_race(sis->flags & SWP_FS_OPS))
                swap_writepage_fs(folio, swap_plug);
        /*
-        * ->flags can be updated non-atomicially (scan_swap_map_slots),
+        * ->flags can be updated non-atomically (scan_swap_map_slots),
         * but that will never affect SWP_SYNCHRONOUS_IO, so the data_race
         * is safe.
         */
index f72b6cd38b958be97edcea9ce20154ff43131a4a..b5924eff4f8b2229277227410694b342a3f4f9a0 100644 (file)
@@ -301,7 +301,7 @@ __first_valid_page(unsigned long pfn, unsigned long nr_pages)
  * pageblock. When not all pageblocks within a page are isolated at the same
  * time, free page accounting can go wrong. For example, in the case of
  * MAX_PAGE_ORDER = pageblock_order + 1, a MAX_PAGE_ORDER page has two
- * pagelbocks.
+ * pageblocks.
  * [      MAX_PAGE_ORDER         ]
  * [  pageblock0  |  pageblock1  ]
  * When either pageblock is isolated, if it is a free page, the page is not
index e4c428e61d8c1765ae00ee22818cfadfd27f324c..8a03effda7494fd43daa8ba887f0563e8246c195 100644 (file)
@@ -123,7 +123,7 @@ page_reporting_drain(struct page_reporting_dev_info *prdev,
                        continue;
 
                /*
-                * If page was not comingled with another page we can
+                * If page was not commingled with another page we can
                 * consider the result to be "reported" since the page
                 * hasn't been modified, otherwise we will need to
                 * report on the new larger page when we make our way
index 2260dcd2775e7514682d8f71296ac8ebc800d5bf..bb19ccbece464dfc9c7183a459f53c9d1a8a04bf 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -513,7 +513,7 @@ void folio_add_lru(struct folio *folio)
 EXPORT_SYMBOL(folio_add_lru);
 
 /**
- * folio_add_lru_vma() - Add a folio to the appropate LRU list for this VMA.
+ * folio_add_lru_vma() - Add a folio to the appropriate LRU list for this VMA.
  * @folio: The folio to be added to the LRU.
  * @vma: VMA in which the folio is mapped.
  *
index d034c13d8dd260cea2a1e95010a9df1e3011bfe4..3dcf198b05e3671e3e2905fb09b673a9d5b47296 100644 (file)
--- a/mm/swap.h
+++ b/mm/swap.h
@@ -236,7 +236,7 @@ static inline bool folio_matches_swap_entry(const struct folio *folio,
 
 /*
  * All swap cache helpers below require the caller to ensure the swap entries
- * used are valid and stablize the device by any of the following ways:
+ * used are valid and stabilize the device by any of the following ways:
  * - Hold a reference by get_swap_device(): this ensures a single entry is
  *   valid and increases the swap device's refcount.
  * - Locking a folio in the swap cache: this ensures the folio's swap entries
index 5f97c6ae70a2f70b472531168eb0d590f36c537b..c6f661436c9a89e954ea0526d6a250efa4f6879d 100644 (file)
@@ -82,7 +82,7 @@ void show_swap_cache_info(void)
  * Context: Caller must ensure @entry is valid and protect the swap device
  * with reference count or locks.
  * Return: Returns the found folio on success, NULL otherwise. The caller
- * must lock nd check if the folio still matches the swap entry before
+ * must lock and check if the folio still matches the swap entry before
  * use (e.g., folio_matches_swap_entry).
  */
 struct folio *swap_cache_get_folio(swp_entry_t entry)
index 46d2008e4b9960444c079138b473764cf6fd6c5e..76273ad26739f08996fb03ebb35eb86de0d1bea4 100644 (file)
@@ -2018,7 +2018,7 @@ swp_entry_t get_swap_page_of_type(int type)
        if (get_swap_device_info(si)) {
                if (si->flags & SWP_WRITEOK) {
                        /*
-                        * Grab the local lock to be complaint
+                        * Grab the local lock to be compliant
                         * with swap table allocation.
                         */
                        local_lock(&percpu_swap_cluster.lock);
index b11f81095fa5392fe911b3539588a85944ab1876..d270d5377630e7e8c8960452b527d481e8d2813d 100644 (file)
@@ -1274,7 +1274,7 @@ retry:
         * Use the maywrite version to indicate that dst_pte will be modified,
         * since dst_pte needs to be none, the subsequent pte_same() check
         * cannot prevent the dst_pte page from being freed concurrently, so we
-        * also need to abtain dst_pmdval and recheck pmd_same() later.
+        * also need to obtain dst_pmdval and recheck pmd_same() later.
         */
        dst_pte = pte_offset_map_rw_nolock(mm, dst_pmd, dst_addr, &dst_pmdval,
                                           &dst_ptl);
@@ -1330,7 +1330,7 @@ retry:
                goto out;
        }
 
-       /* If PTE changed after we locked the folio them start over */
+       /* If PTE changed after we locked the folio then start over */
        if (src_folio && unlikely(!pte_same(src_folio_pte, orig_src_pte))) {
                ret = -EAGAIN;
                goto out;
index 7a908a964d18df355c7e103cd97ee96e9900bfcc..f81a5cfcd7cc15dfb22622ed93bb387661a7e9b7 100644 (file)
--- a/mm/vma.c
+++ b/mm/vma.c
@@ -2951,10 +2951,10 @@ retry:
                return -ENOMEM;
 
        /*
-        * Adjust for the gap first so it doesn't interfere with the
-        * later alignment. The first step is the minimum needed to
-        * fulill the start gap, the next steps is the minimum to align
-        * that. It is the minimum needed to fulill both.
+        * Adjust for the gap first so it doesn't interfere with the later
+        * alignment. The first step is the minimum needed to fulfill the start
+        * gap, the next step is the minimum to align that. It is the minimum
+        * needed to fulfill both.
         */
        gap = vma_iter_addr(&vmi) + info->start_gap;
        gap += (info->align_offset - gap) & info->align_mask;
index 9d5ee6ac913ad1a8accdfc80b33e051b24fc876c..8526f22c9f5a267e28f0a1347b40953364810316 100644 (file)
--- a/mm/vma.h
+++ b/mm/vma.h
@@ -267,7 +267,7 @@ void unmap_region(struct ma_state *mas, struct vm_area_struct *vma,
                struct vm_area_struct *prev, struct vm_area_struct *next);
 
 /**
- * vma_modify_flags() - Peform any necessary split/merge in preparation for
+ * vma_modify_flags() - Perform any necessary split/merge in preparation for
  * setting VMA flags to *@vm_flags in the range @start to @end contained within
  * @vma.
  * @vmi: Valid VMA iterator positioned at @vma.
@@ -295,7 +295,7 @@ __must_check struct vm_area_struct *vma_modify_flags(struct vma_iterator *vmi,
                vm_flags_t *vm_flags_ptr);
 
 /**
- * vma_modify_name() - Peform any necessary split/merge in preparation for
+ * vma_modify_name() - Perform any necessary split/merge in preparation for
  * setting anonymous VMA name to @new_name in the range @start to @end contained
  * within @vma.
  * @vmi: Valid VMA iterator positioned at @vma.
@@ -319,7 +319,7 @@ __must_check struct vm_area_struct *vma_modify_name(struct vma_iterator *vmi,
                struct anon_vma_name *new_name);
 
 /**
- * vma_modify_policy() - Peform any necessary split/merge in preparation for
+ * vma_modify_policy() - Perform any necessary split/merge in preparation for
  * setting NUMA policy to @new_pol in the range @start to @end contained
  * within @vma.
  * @vmi: Valid VMA iterator positioned at @vma.
@@ -343,7 +343,7 @@ __must_check struct vm_area_struct *vma_modify_policy(struct vma_iterator *vmi,
                   struct mempolicy *new_pol);
 
 /**
- * vma_modify_flags_uffd() - Peform any necessary split/merge in preparation for
+ * vma_modify_flags_uffd() - Perform any necessary split/merge in preparation for
  * setting VMA flags to @vm_flags and UFFD context to @new_ctx in the range
  * @start to @end contained within @vma.
  * @vmi: Valid VMA iterator positioned at @vma.
index fc5691afb99876c672fb1c7f80c5a43ab40e34fb..619691aa43938aef8f8d89866600fa1544b19c47 100644 (file)
@@ -1063,7 +1063,7 @@ static bool may_enter_fs(struct folio *folio, gfp_t gfp_mask)
        /*
         * We can "enter_fs" for swap-cache with only __GFP_IO
         * providing this isn't SWP_FS_OPS.
-        * ->flags can be updated non-atomicially (scan_swap_map_slots),
+        * ->flags can be updated non-atomically (scan_swap_map_slots),
         * but that will never affect SWP_FS_OPS, so the data_race
         * is safe.
         */
index 65de88cdf40e62f4cc6748a438b81bad511448d4..bd2af431ff86287e6ac256104ed733f116f3fa6c 100644 (file)
@@ -1626,7 +1626,7 @@ static void pagetypeinfo_showfree_print(struct seq_file *m,
        }
 }
 
-/* Print out the free pages at each order for each migatetype */
+/* Print out the free pages at each order for each migratetype */
 static void pagetypeinfo_showfree(struct seq_file *m, void *arg)
 {
        int order;
index 5bf832f9c05c97c252f97aab5f0c3a75350b42e1..84da164dcbc5b9b17709f0583715e3cf54134c21 100644 (file)
 
 /*
  * On systems with 4K page size, this gives 255 size classes! There is a
- * trader-off here:
+ * trade-off here:
  *  - Large number of size classes is potentially wasteful as free page are
  *    spread across these classes
  *  - Small number of size classes causes large internal fragmentation