* + zsmalloc-fix-a-race-with-deferred_handles-storing-fix.patch added to mm-hotfixes-unstable branch
@ 2023-01-18 0:54 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-01-18 0:54 UTC (permalink / raw)
To: mm-commits, senozhatsky, arnd, akpm
The patch titled
Subject: zsmalloc: avoid unused-function warning
has been added to the -mm mm-hotfixes-unstable branch. Its filename is
zsmalloc-fix-a-race-with-deferred_handles-storing-fix.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/zsmalloc-fix-a-race-with-deferred_handles-storing-fix.patch
This patch will later appear in the mm-hotfixes-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: Arnd Bergmann <arnd@arndb.de>
Subject: zsmalloc: avoid unused-function warning
Date: Tue, 17 Jan 2023 18:04:59 +0100
obj_allocated() can be called from two places that are each inside of an
#ifdef. When both are disabled, the compiler warns:
mm/zsmalloc.c:900:13: error: 'obj_allocated' defined but not used [-Werror=unused-function]
Rather than trying to figure out the correct #ifdef, mark the trivial
function as 'inline', which implies __maybe_unused and shuts up the
warning.
Link: https://lkml.kernel.org/r/20230117170507.2651972-1-arnd@kernel.org
Fixes: 796c71ac728e ("zsmalloc: fix a race with deferred_handles storing")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
--- a/mm/zsmalloc.c~zsmalloc-fix-a-race-with-deferred_handles-storing-fix
+++ a/mm/zsmalloc.c
@@ -937,7 +937,7 @@ static bool obj_tagged(struct page *page
return true;
}
-static bool obj_allocated(struct page *page, void *obj, unsigned long *phandle)
+static inline bool obj_allocated(struct page *page, void *obj, unsigned long *phandle)
{
return obj_tagged(page, obj, phandle, OBJ_ALLOCATED_TAG);
}
_
Patches currently in -mm which might be from arnd@arndb.de are
zsmalloc-fix-a-race-with-deferred_handles-storing-fix.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-18 1:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-18 0:54 + zsmalloc-fix-a-race-with-deferred_handles-storing-fix.patch added to mm-hotfixes-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.