diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2016-01-14 18:21:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-14 19:00:49 -0500 |
commit | ef12947c9c5a96af549c49f10e5503f0612a397c (patch) | |
tree | 451cedbe700b86411cc95c7bf27b02e967ff0fc9 /include/linux/memcontrol.h | |
parent | 8e8ae645249b85c8ed6c178557f8db8613a6bcc7 (diff) |
mm: memcontrol: switch to the updated jump-label API
According to <linux/jump_label.h> the direct use of struct static_key is
deprecated. Update the socket and slab accounting code accordingly.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: David S. Miller <davem@davemloft.net>
Reported-by: Jason Baron <jbaron@akamai.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/memcontrol.h')
-rw-r--r-- | include/linux/memcontrol.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index c5a51039df57..2292468f2a30 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -704,8 +704,8 @@ void sock_release_memcg(struct sock *sk); | |||
704 | bool mem_cgroup_charge_skmem(struct mem_cgroup *memcg, unsigned int nr_pages); | 704 | bool mem_cgroup_charge_skmem(struct mem_cgroup *memcg, unsigned int nr_pages); |
705 | void mem_cgroup_uncharge_skmem(struct mem_cgroup *memcg, unsigned int nr_pages); | 705 | void mem_cgroup_uncharge_skmem(struct mem_cgroup *memcg, unsigned int nr_pages); |
706 | #if defined(CONFIG_MEMCG) && defined(CONFIG_INET) | 706 | #if defined(CONFIG_MEMCG) && defined(CONFIG_INET) |
707 | extern struct static_key memcg_sockets_enabled_key; | 707 | extern struct static_key_false memcg_sockets_enabled_key; |
708 | #define mem_cgroup_sockets_enabled static_key_false(&memcg_sockets_enabled_key) | 708 | #define mem_cgroup_sockets_enabled static_branch_unlikely(&memcg_sockets_enabled_key) |
709 | static inline bool mem_cgroup_under_socket_pressure(struct mem_cgroup *memcg) | 709 | static inline bool mem_cgroup_under_socket_pressure(struct mem_cgroup *memcg) |
710 | { | 710 | { |
711 | #ifdef CONFIG_MEMCG_KMEM | 711 | #ifdef CONFIG_MEMCG_KMEM |
@@ -727,7 +727,7 @@ static inline bool mem_cgroup_under_socket_pressure(struct mem_cgroup *memcg) | |||
727 | #endif | 727 | #endif |
728 | 728 | ||
729 | #ifdef CONFIG_MEMCG_KMEM | 729 | #ifdef CONFIG_MEMCG_KMEM |
730 | extern struct static_key memcg_kmem_enabled_key; | 730 | extern struct static_key_false memcg_kmem_enabled_key; |
731 | 731 | ||
732 | extern int memcg_nr_cache_ids; | 732 | extern int memcg_nr_cache_ids; |
733 | void memcg_get_cache_ids(void); | 733 | void memcg_get_cache_ids(void); |
@@ -743,7 +743,7 @@ void memcg_put_cache_ids(void); | |||
743 | 743 | ||
744 | static inline bool memcg_kmem_enabled(void) | 744 | static inline bool memcg_kmem_enabled(void) |
745 | { | 745 | { |
746 | return static_key_false(&memcg_kmem_enabled_key); | 746 | return static_branch_unlikely(&memcg_kmem_enabled_key); |
747 | } | 747 | } |
748 | 748 | ||
749 | static inline bool memcg_kmem_is_active(struct mem_cgroup *memcg) | 749 | static inline bool memcg_kmem_is_active(struct mem_cgroup *memcg) |