+ zsmalloc-fix-a-race-with-deferred_handles-storing-fix.patch added to mm-hotfixes-unstable branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
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@xxxxxxxxxx
Fixes: 796c71ac728e ("zsmalloc: fix a race with deferred_handles storing")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Reviewed-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---


--- 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@xxxxxxxx are

zsmalloc-fix-a-race-with-deferred_handles-storing-fix.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux