[PATCH v2 00/14] mm/shmem: various (urgent?) fixes

From: David Hildenbrand (Arm)

Date: Tue Oct 27 2026 - 09:06:19 EST


Hi,

see v1 for details. TL;DR various fixes.

I now rebased on top of mm-stable (thanks Zi!) and retested with
Gregory's tests (thanks!). Thanks everyone for the fast review!

When sending this upstream there will be one conflict with the following
upstream commit:

737362c7012a ("fs: port ->set_acl() to pass const mnt_idmap")

Which should get resolved through something like

diff --git a/mm/shmem.c b/mm/shmem.c
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@
-static int shmem_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
+static int shmem_set_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
struct posix_acl *acl, int type)

Signed-off-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
---
Changes in v2:
- Rebased on mm-stable
- Fixup shmem_set_acl() compilation issue after rebase
- Dropped: "mm/shmem: avoid moving the truncation start backwards"
- Fixed up: "mm/shmem: stop retrying folios that cannot be split"
- In "hugetlbfs: enforce F_SEAL_EXEC in setattr", check for S_ISREG
- Smaller patch description fixups
- Picked up tags
- Link to v1: https://patch.msgid.link/20261026-fixes_shmem-v1-0-703206d5fa0c@xxxxxxxxxx

---

Chris Mason (4):
mm/mempolicy: charge shared policy nodes
mm/shmem: honour F_SEAL_EXEC when an ACL is set
mm/shmem: stop retrying folios that cannot be split
mm/shmem: preserve data in clean folios when splitting fails

David Hildenbrand (Arm) (7):
mm/shmem: discard whole new large folios on fallocate rollback
mm/shmem: rescan after nonuniform folio splitting
mm/shmem: fix truncate hang in large swap entry
mm/shmem: preserve allocation errors when swapping in large entries
mm/shmem: fix truncate loop after boundary swapin failure
mm/shmem: fix accounting of swapin-error markers
mm/shmem: fix truncation of files containing only swapin-error markers

Eva Kurchatova (1):
hugetlbfs: enforce F_SEAL_EXEC in setattr

Josef Bacik (2):
tmpfs: keep the quota soft limits of an unused id
tmpfs: preserve explicitly disabled quota limits

fs/hugetlbfs/inode.c | 8 +++
include/linux/memfd.h | 9 ++++
mm/mempolicy.c | 4 +-
mm/shmem.c | 132 ++++++++++++++++++++++++++++++++------------------
mm/shmem_quota.c | 28 ++++++-----
5 files changed, 119 insertions(+), 62 deletions(-)

---

base-commit: 183895979c441e52dbd651b388553b09eaa35cfa

change-id: 20261025-fixes_shmem-2782719b130e

--

Cheers,

David