* + mm-shmem-remove-unneeded-assignments-in-shmem_get_folio_gfp.patch added to mm-unstable branch
@ 2022-10-18 0:25 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-10-18 0:25 UTC (permalink / raw)
To: mm-commits, willy, hughd, lukas.bulwahn, akpm
The patch titled
Subject: mm/shmem: remove unneeded assignments in shmem_get_folio_gfp()
has been added to the -mm mm-unstable branch. Its filename is
mm-shmem-remove-unneeded-assignments-in-shmem_get_folio_gfp.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-shmem-remove-unneeded-assignments-in-shmem_get_folio_gfp.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 the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Subject: mm/shmem: remove unneeded assignments in shmem_get_folio_gfp()
Date: Fri, 7 Oct 2022 10:50:27 +0200
After the rework of shmem_get_folio_gfp() to use a folio, the local
variable hindex is only needed to be set once before passing it to
shmem_add_to_page_cache().
Remove the unneeded initialization and assignments of the variable hindex
before the actual effective assignment and first use.
No functional change. No change in object code.
Link: https://lkml.kernel.org/r/20221007085027.6309-1-lukas.bulwahn@gmail.com
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/shmem.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/mm/shmem.c~mm-shmem-remove-unneeded-assignments-in-shmem_get_folio_gfp
+++ a/mm/shmem.c
@@ -1826,7 +1826,7 @@ static int shmem_get_folio_gfp(struct in
struct shmem_sb_info *sbinfo;
struct mm_struct *charge_mm;
struct folio *folio;
- pgoff_t hindex = index;
+ pgoff_t hindex;
gfp_t huge_gfp;
int error;
int once = 0;
@@ -1864,7 +1864,6 @@ repeat:
}
if (folio) {
- hindex = folio->index;
if (sgp == SGP_WRITE)
folio_mark_accessed(folio);
if (folio_test_uptodate(folio))
_
Patches currently in -mm which might be from lukas.bulwahn@gmail.com are
mm-shmem-remove-unneeded-assignments-in-shmem_get_folio_gfp.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-18 0:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-18 0:25 + mm-shmem-remove-unneeded-assignments-in-shmem_get_folio_gfp.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.