From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 020CB29ACC3 for ; Sun, 21 Sep 2025 21:24:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758489873; cv=none; b=JdJSB+W3OQRO2oKDPb257K8faReY4AMM8pP+0z45EdTSZxjGx+iXmM6POvNVQyB8KTpMFuSdSZMPJXPHFiK+R38esCuNxP318EY4gRFh+Wc7G5rEQjYsSc0lPq5cqyZhRqvWu1JlQwF5tEK6/sfjuPYf3a1FuMhdsStAZfsCTFg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758489873; c=relaxed/simple; bh=tA8UGMG2xysoueiMQpom296JS3M6hxdMaaDVotPPz+8=; h=Date:To:From:Subject:Message-Id; b=OW5jwG//w7SP8x2vjitpGCogXaPs1+j+l6tfpVpqvmrlV7ebQqjmof4vPkT4mdb8Wk6rFAnYKM+0eWNLGmi9Odk4/OaUlrdjSCdQi6UdHMICetdQfDRJztmvwSusqRDH+Tks6D84xE9kEGRrzUoEBRtEWAj6c9nkmY9xavNX35g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=kU+NxnJ8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="kU+NxnJ8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74F2CC4CEE7; Sun, 21 Sep 2025 21:24:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1758489872; bh=tA8UGMG2xysoueiMQpom296JS3M6hxdMaaDVotPPz+8=; h=Date:To:From:Subject:From; b=kU+NxnJ8eiEthW20mpznN176jsB0YF02jZfbVV7ZiZum7d0Rs3c38AclCAEBp19K5 nLH7QJ1DM34jfn37lvBcJVosIx9IbW0HquGdO/yWPnLv1h8SK2dmcKn4d34vdFtppD 9HCH88ItVVvNTKL45Fsn90rysTv+zd+g4XHE3BnQ= Date: Sun, 21 Sep 2025 14:24:31 -0700 To: mm-commits@vger.kernel.org,yuanchu@google.com,willy@infradead.org,weixugc@google.com,vishal.moola@gmail.com,viro@zeniv.linux.org.uk,vbabka@suse.cz,thuth@redhat.com,tglx@linutronix.de,svens@linux.ibm.com,surenb@google.com,shakeel.butt@linux.dev,rppt@kernel.org,rientjes@google.com,peterz@infradead.org,osalvador@suse.de,nysal@linux.ibm.com,mpe@ellerman.id.au,mingo@redhat.com,mhocko@suse.com,luto@kernel.org,lorenzo.stoakes@oracle.com,linux@armlinux.org.uk,liam.howlett@oracle.com,jfalempe@redhat.com,jcmvbkbc@gmail.com,james.bottomley@HansenPartnership.com,jack@suse.cz,hughd@google.com,hpa@zytor.com,hca@linux.ibm.com,gor@linux.ibm.com,gerald.schaefer@linux.ibm.com,deller@gmx.de,david@redhat.com,davem@davemloft.net,chris@zankel.net,broonie@kernel.org,brauner@kernel.org,bp@alien8.de,borntraeger@linux.ibm.com,baolin.wang@linux.alibaba.com,axelrasmussen@google.com,andreas@gaisler.com,agordeev@linux.ibm.com,max.kellermann@ionos.com,akpm@linux-foundation.org From: Andrew Morton Subject: [merged mm-stable] mm-constify-process_shares_mm-for-improved-const-correctness.patch removed from -mm tree Message-Id: <20250921212432.74F2CC4CEE7@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The quilt patch titled Subject: mm: constify process_shares_mm() for improved const-correctness has been removed from the -mm tree. Its filename was mm-constify-process_shares_mm-for-improved-const-correctness.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: Max Kellermann Subject: mm: constify process_shares_mm() for improved const-correctness Date: Mon, 1 Sep 2025 22:50:14 +0200 This function only reads from the pointer arguments. Local (loop) variables are also annotated with `const` to clarify that these will not be written to. Link: https://lkml.kernel.org/r/20250901205021.3573313-6-max.kellermann@ionos.com Signed-off-by: Max Kellermann Reviewed-by: Lorenzo Stoakes Acked-by: David Hildenbrand Acked-by: Vlastimil Babka Acked-by: Mike Rapoport (Microsoft) Acked-by: Shakeel Butt Cc: Alexander Gordeev Cc: Al Viro Cc: Andreas Larsson Cc: Andy Lutomirski Cc: Axel Rasmussen Cc: Baolin Wang Cc: Borislav Betkov Cc: Christian Borntraeger Cc: Christian Brauner Cc: Christian Zankel Cc: David Rientjes Cc: David S. Miller Cc: Gerald Schaefer Cc: Heiko Carstens Cc: Helge Deller Cc: "H. Peter Anvin" Cc: Hugh Dickins Cc: Ingo Molnar Cc: James Bottomley Cc: Jan Kara Cc: Jocelyn Falempe Cc: Liam Howlett Cc: Mark Brown Cc: Matthew Wilcox (Oracle) Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Hocko Cc: "Nysal Jan K.A" Cc: Oscar Salvador Cc: Peter Zijlstra Cc: Russel King Cc: Suren Baghdasaryan Cc: Sven Schnelle Cc: Thomas Gleinxer Cc: Thomas Huth Cc: Vasily Gorbik Cc: Vishal Moola (Oracle) Cc: Wei Xu Cc: Yuanchu Xie Signed-off-by: Andrew Morton --- include/linux/mm.h | 2 +- mm/oom_kill.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) --- a/include/linux/mm.h~mm-constify-process_shares_mm-for-improved-const-correctness +++ a/include/linux/mm.h @@ -3872,7 +3872,7 @@ static inline int in_gate_area(struct mm } #endif /* __HAVE_ARCH_GATE_AREA */ -extern bool process_shares_mm(struct task_struct *p, struct mm_struct *mm); +bool process_shares_mm(const struct task_struct *p, const struct mm_struct *mm); void drop_slab(void); --- a/mm/oom_kill.c~mm-constify-process_shares_mm-for-improved-const-correctness +++ a/mm/oom_kill.c @@ -490,12 +490,12 @@ static bool oom_killer_disabled __read_m * task's threads: if one of those is using this mm then this task was also * using it. */ -bool process_shares_mm(struct task_struct *p, struct mm_struct *mm) +bool process_shares_mm(const struct task_struct *p, const struct mm_struct *mm) { - struct task_struct *t; + const struct task_struct *t; for_each_thread(p, t) { - struct mm_struct *t_mm = READ_ONCE(t->mm); + const struct mm_struct *t_mm = READ_ONCE(t->mm); if (t_mm) return t_mm == mm; } _ Patches currently in -mm which might be from max.kellermann@ionos.com are