All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] mm-shmem-fix-minor-off-by-one-in-shrinkable-calculation.patch removed from -mm tree
@ 2024-09-09 23:40 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-09-09 23:40 UTC (permalink / raw)
  To: mm-commits, david, baolin.wang, hughd, akpm


The quilt patch titled
     Subject: mm: shmem: fix minor off-by-one in shrinkable calculation
has been removed from the -mm tree.  Its filename was
     mm-shmem-fix-minor-off-by-one-in-shrinkable-calculation.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Hugh Dickins <hughd@google.com>
Subject: mm: shmem: fix minor off-by-one in shrinkable calculation
Date: Sun, 25 Aug 2024 15:42:45 -0700 (PDT)

There has been a long-standing and very minor off-by-one, where
shmem_get_folio_gfp() decides if a large folio extends beyond i_size far
enough to leave a page or more for freeing later under pressure.

This is not something needed for stable: but it will be proportionately
more significant as support for smaller large folios is added, and is best
fixed before duplicating the check in other places.

Link: https://lkml.kernel.org/r/d8e75079-af2d-8519-56df-6be1dccc247a@google.com
Fixes: 779750d20b93 ("shmem: split huge pages beyond i_size under memory pressure")
Signed-off-by: Hugh Dickins <hughd@google.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/shmem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/shmem.c~mm-shmem-fix-minor-off-by-one-in-shrinkable-calculation
+++ a/mm/shmem.c
@@ -2348,7 +2348,7 @@ alloced:
 	alloced = true;
 	if (folio_test_large(folio) &&
 	    DIV_ROUND_UP(i_size_read(inode), PAGE_SIZE) <
-					folio_next_index(folio) - 1) {
+					folio_next_index(folio)) {
 		struct shmem_sb_info *sbinfo = SHMEM_SB(inode->i_sb);
 		struct shmem_inode_info *info = SHMEM_I(inode);
 		/*
_

Patches currently in -mm which might be from hughd@google.com are



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

only message in thread, other threads:[~2024-09-09 23:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-09 23:40 [merged mm-stable] mm-shmem-fix-minor-off-by-one-in-shrinkable-calculation.patch removed from -mm tree 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.