lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0811162046080.5813@blonde.site>
Date:	Sun, 16 Nov 2008 20:52:22 +0000 (GMT)
From:	Hugh Dickins <hugh@...itas.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
cc:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: [PATCH mmotm] memcg: handle swap caches build fix

Fix to build error when CONFIG_SHMEM=y but CONFIG_SWAP is not set:
mm/shmem.c: In function ‘shmem_unuse_inode’:
mm/shmem.c:927: error: implicit declaration of function ‘mem_cgroup_cache_charge_swapin’

Yes, there's a lot of code in mm/shmem.c which only comes into play when
CONFIG_SWAP=y: better than this quick fix would be to restructure shmem.c
with all swap stuff in a separate file; that's on my mind, but now is not
the moment for it.

Signed-off-by: Hugh Dickins <hugh@...itas.com>
---
Fix should follow or be merged into memcg-handle-swap-caches.patch

 include/linux/swap.h |    6 ++++++
 1 file changed, 6 insertions(+)

--- mmotm/include/linux/swap.h	2008-11-16 17:33:25.000000000 +0000
+++ linux/include/linux/swap.h	2008-11-16 20:18:27.000000000 +0000
@@ -442,6 +442,12 @@ static inline swp_entry_t get_swap_page(
 #define has_swap_token(x) 0
 #define disable_swap_token() do { } while(0)
 
+static inline int mem_cgroup_cache_charge_swapin(struct page *page,
+			struct mm_struct *mm, gfp_t mask, bool locked)
+{
+	return 0;
+}
+
 #endif /* CONFIG_SWAP */
 #endif /* __KERNEL__*/
 #endif /* _LINUX_SWAP_H */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ