All of lore.kernel.org
 help / color / mirror / Atom feed
* + hugetlbfs-fix-stale-comment-in-hugetlbfs_file_mmap.patch added to mm-unstable branch
@ 2026-09-23  2:46 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-09-23  2:46 UTC (permalink / raw)
  To: mm-commits, osalvador, muchun.song, david, zhenghui.hao, akpm


The patch titled
     Subject: hugetlbfs: fix stale comment in hugetlbfs_file_mmap()
has been added to the -mm mm-unstable branch.  Its filename is
     hugetlbfs-fix-stale-comment-in-hugetlbfs_file_mmap.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/hugetlbfs-fix-stale-comment-in-hugetlbfs_file_mmap.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: Zhenghui Hao <zhenghui.hao@qq.com>
Subject: hugetlbfs: fix stale comment in hugetlbfs_file_mmap()
Date: Wed, 23 Sep 2026 10:28:58 +0800

The comment above the VMA flag setup in hugetlbfs_file_mmap() says the VMA
address alignment has already been checked by prepare_hugepage_range(). 
That function no longer exists: it was removed by commit eff41389d824
("mm/hugetlb: remove prepare_hugepage_range()"), and the check now lives
in hugetlb_get_unmapped_area().

The comment also mentions ia64, which was removed from the tree by commit
cf8e8658100d ("arch: Remove Itanium (IA-64) architecture").

Point the comment at the current function and drop the ia64 reference. 
The rest of the comment, which tells future edits to add any error return
only after VM_HUGETLB has been set, is still accurate and is left
untouched.

No functional change.

Link: https://lore.kernel.org/tencent_AA61551D1F50E61F46C8542F5C8874512C05@qq.com
Signed-off-by: Zhenghui Hao <zhenghui.hao@qq.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Muchun Song <muchun.song@linux.dev>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: David Hildenbrand <david@kernel.org>
---

 fs/hugetlbfs/inode.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

--- a/fs/hugetlbfs/inode.c~hugetlbfs-fix-stale-comment-in-hugetlbfs_file_mmap
+++ a/fs/hugetlbfs/inode.c
@@ -106,11 +106,10 @@ static int hugetlbfs_file_mmap(struct fi
 
 	/*
 	 * vma address alignment (but not the pgoff alignment) has
-	 * already been checked by prepare_hugepage_range.  If you add
-	 * any error returns here, do so after setting VM_HUGETLB, so
-	 * vma_is_hugetlb tests below unmap_region go the right
-	 * way when do_mmap unwinds (may be important on powerpc
-	 * and ia64).
+	 * already been checked by hugetlb_get_unmapped_area().  If you
+	 * add any error returns here, do so after setting VM_HUGETLB,
+	 * so vma_is_hugetlb tests below unmap_region go the right
+	 * way when do_mmap unwinds (may be important on powerpc).
 	 */
 	vma_set_flags(vma, VMA_HUGETLB_BIT, VMA_DONTEXPAND_BIT);
 	vma->vm_ops = &hugetlb_vm_ops;
_

Patches currently in -mm which might be from zhenghui.hao@qq.com are

mm-hugetlb-fix-misspelled-parameter-names-in-comment.patch
hugetlbfs-fix-stale-comment-in-hugetlbfs_file_mmap.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-23  2:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-23  2:46 + hugetlbfs-fix-stale-comment-in-hugetlbfs_file_mmap.patch added to mm-unstable branch Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.