Commit eeccf287a2a5 for kernel
commit eeccf287a2a517954b57cf9d733b3cf5d47afa34
Merge: 956b9cbd7f15 ac1ea219590c
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Wed Feb 18 20:50:32 2026 -0800
Merge tag 'mm-stable-2026-02-18-19-48' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull more MM updates from Andrew Morton:
- "mm/vmscan: fix demotion targets checks in reclaim/demotion" fixes a
couple of issues in the demotion code - pages were failed demotion
and were finding themselves demoted into disallowed nodes (Bing Jiao)
- "Remove XA_ZERO from error recovery of dup_mmap()" fixes a rare
mapledtree race and performs a number of cleanups (Liam Howlett)
- "mm: add bitmap VMA flag helpers and convert all mmap_prepare to use
them" implements a lot of cleanups following on from the conversion
of the VMA flags into a bitmap (Lorenzo Stoakes)
- "support batch checking of references and unmapping for large folios"
implements batching to greatly improve the performance of reclaiming
clean file-backed large folios (Baolin Wang)
- "selftests/mm: add memory failure selftests" does as claimed (Miaohe
Lin)
* tag 'mm-stable-2026-02-18-19-48' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (36 commits)
mm/page_alloc: clear page->private in free_pages_prepare()
selftests/mm: add memory failure dirty pagecache test
selftests/mm: add memory failure clean pagecache test
selftests/mm: add memory failure anonymous page test
mm: rmap: support batched unmapping for file large folios
arm64: mm: implement the architecture-specific clear_flush_young_ptes()
arm64: mm: support batch clearing of the young flag for large folios
arm64: mm: factor out the address and ptep alignment into a new helper
mm: rmap: support batched checks of the references for large folios
tools/testing/vma: add VMA userland tests for VMA flag functions
tools/testing/vma: separate out vma_internal.h into logical headers
tools/testing/vma: separate VMA userland tests into separate files
mm: make vm_area_desc utilise vma_flags_t only
mm: update all remaining mmap_prepare users to use vma_flags_t
mm: update shmem_[kernel]_file_*() functions to use vma_flags_t
mm: update secretmem to use VMA flags on mmap_prepare
mm: update hugetlbfs to use VMA flags on mmap_prepare
mm: add basic VMA flag operation helper functions
tools: bitmap: add missing bitmap_[subset(), andnot()]
mm: add mk_vma_flags() bitmap flag macro helper
...
diff --cc drivers/gpu/drm/drm_gem.c
index ffa7852c8f6c,be4dca2bc34e..f7094c4aa97a
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@@ -176,25 -119,26 +176,26 @@@ drm_gem_init(struct drm_device *dev
* @dev: drm_device the object should be initialized for
* @obj: drm_gem_object to initialize
* @size: object size
- * @gemfs: tmpfs mount where the GEM object will be created. If NULL, use
- * the usual tmpfs mountpoint (`shm_mnt`).
*
* Initialize an already allocated GEM object of the specified size with
- * shmfs backing store.
+ * shmfs backing store. A huge mountpoint can be used by calling
+ * drm_gem_huge_mnt_create() beforehand.
*/
-int drm_gem_object_init_with_mnt(struct drm_device *dev,
- struct drm_gem_object *obj, size_t size,
- struct vfsmount *gemfs)
+int drm_gem_object_init(struct drm_device *dev, struct drm_gem_object *obj,
+ size_t size)
{
+ struct vfsmount *huge_mnt;
struct file *filp;
+ const vma_flags_t flags = mk_vma_flags(VMA_NORESERVE_BIT);
drm_gem_private_object_init(dev, obj, size);
- if (gemfs)
- filp = shmem_file_setup_with_mnt(gemfs, "drm mm object", size,
- flags);
+ huge_mnt = drm_gem_get_huge_mnt(dev);
+ if (huge_mnt)
+ filp = shmem_file_setup_with_mnt(huge_mnt, "drm mm object",
- size, VM_NORESERVE);
++ size, flags);
else
- filp = shmem_file_setup("drm mm object", size, VM_NORESERVE);
+ filp = shmem_file_setup("drm mm object", size, flags);
if (IS_ERR(filp))
return PTR_ERR(filp);
diff --cc drivers/gpu/drm/i915/gem/i915_gem_shmem.c
index 6ad1d6f99363,fe1843497b27..95b13d172913
--- a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
@@@ -496,11 -494,9 +496,11 @@@ const struct drm_i915_gem_object_ops i9
static int __create_shmem(struct drm_i915_private *i915,
struct drm_gem_object *obj,
- resource_size_t size)
+ resource_size_t size,
+ unsigned int flags)
{
- unsigned long shmem_flags = VM_NORESERVE;
- const vma_flags_t flags = mk_vma_flags(VMA_NORESERVE_BIT);
++ const vma_flags_t shmem_flags = mk_vma_flags(VMA_NORESERVE_BIT);
+ struct vfsmount *huge_mnt;
struct file *filp;
drm_gem_private_object_init(&i915->drm, obj, size);
diff --cc fs/ntfs3/file.c
index ae8c47cac406,2902fc6d9a85..f53037e0ecb6
--- a/fs/ntfs3/file.c
+++ b/fs/ntfs3/file.c
@@@ -276,7 -346,8 +276,7 @@@ static int ntfs_file_mmap_prepare(struc
struct file *file = desc->file;
struct inode *inode = file_inode(file);
struct ntfs_inode *ni = ntfs_i(inode);
- bool rw = desc->vm_flags & VM_WRITE;
- u64 from = ((u64)desc->pgoff << PAGE_SHIFT);
+ const bool rw = vma_desc_test_flags(desc, VMA_WRITE_BIT);
int err;
/* Avoid any operation if inode is bad. */
diff --cc tools/testing/selftests/mm/Makefile
index dca8f590c1e6,4847c6d6c1b0..7a5de4e9bf52
--- a/tools/testing/selftests/mm/Makefile
+++ b/tools/testing/selftests/mm/Makefile
@@@ -72,9 -72,10 +72,10 @@@ TEST_GEN_FILES += madv_populat
TEST_GEN_FILES += map_fixed_noreplace
TEST_GEN_FILES += map_hugetlb
TEST_GEN_FILES += map_populate
-ifneq (,$(filter $(ARCH),arm64 riscv riscv64 x86 x86_64))
+ifneq (,$(filter $(ARCH),arm64 riscv riscv64 x86 x86_64 loongarch32 loongarch64))
TEST_GEN_FILES += memfd_secret
endif
+ TEST_GEN_FILES += memory-failure
TEST_GEN_FILES += migration
TEST_GEN_FILES += mkdirty
TEST_GEN_FILES += mlock-random-test