[Devel] [PATCH RHEL7 COMMIT] bc: add {, un}charge_beancounter_fast define for !CONFIG_BEANCOUNTERS
Konstantin Khorenko
khorenko at odin.com
Thu May 7 09:28:04 PDT 2015
The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.4.10
------>
commit 0a7dbbce30853b60f4f6f8a4c51257f3ed04d158
Author: Kir Kolyshkin <kir at openvz.org>
Date: Thu May 7 20:28:04 2015 +0400
bc: add {,un}charge_beancounter_fast define for !CONFIG_BEANCOUNTERS
This was found while tring to compile the kernel with a stock
config (i.e. no CONFIG_BEANCOUNTERS, CONFIG_VE etc.) and
boot it on IBM Power8.
=============================================================
Fix this:
CC mm/shmem.o
mm/shmem.c: In function âshmem_acct_sizeâ:
mm/shmem.c:180:2: error: implicit declaration of function
âcharge_beancounter_fastâ [-Werror=implicit-function-declaration]
ret = charge_beancounter_fast(ub, UB_PRIVVMPAGES, pages, UB_HARD);
^
mm/shmem.c:211:2: error: implicit declaration of function
âuncharge_beancounter_fastâ [-Werror=implicit-function-declaration]
uncharge_beancounter_fast(ub, UB_PRIVVMPAGES, pages);
^
cc1: some warnings being treated as errors
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
include/bc/beancounter.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/bc/beancounter.h b/include/bc/beancounter.h
index 4889c3f..f332de9 100644
--- a/include/bc/beancounter.h
+++ b/include/bc/beancounter.h
@@ -270,8 +270,10 @@ static inline void ub_init_early(void) { };
static inline int charge_beancounter(struct user_beancounter *ub,
int resource, unsigned long val,
enum ub_severity strict) { return 0; }
+#define charge_beancounter_fast charge_beancounter
static inline void uncharge_beancounter(struct user_beancounter *ub,
int resource, unsigned long val) { }
+#define uncharge_beancounter_fast uncharge_beancounter
static inline void ub_reclaim_rate_limit(struct user_beancounter *ub,
int wait, unsigned count) { }
More information about the Devel
mailing list