diff options
| author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-19 15:19:19 -0400 |
|---|---|---|
| committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-19 15:19:19 -0400 |
| commit | e05dacd71db0a5da7c1a44bcaab2a8a240b9c233 (patch) | |
| tree | 31382cf1c7d62c03126448affb2fc86e8c4aaa8b /include/linux/memcontrol.h | |
| parent | 3ab0b83bf6a1e834f4b884150d8012990c75d25d (diff) | |
| parent | ddffeb8c4d0331609ef2581d84de4d763607bd37 (diff) | |
Merge commit 'v3.7-rc1' into stable/for-linus-3.7
* commit 'v3.7-rc1': (10892 commits)
Linux 3.7-rc1
x86, boot: Explicitly include autoconf.h for hostprogs
perf: Fix UAPI fallout
ARM: config: make sure that platforms are ordered by option string
ARM: config: sort select statements alphanumerically
UAPI: (Scripted) Disintegrate include/linux/byteorder
UAPI: (Scripted) Disintegrate include/linux
UAPI: Unexport linux/blk_types.h
UAPI: Unexport part of linux/ppp-comp.h
perf: Handle new rbtree implementation
procfs: don't need a PATH_MAX allocation to hold a string representation of an int
vfs: embed struct filename inside of names_cache allocation if possible
audit: make audit_inode take struct filename
vfs: make path_openat take a struct filename pointer
vfs: turn do_path_lookup into wrapper around struct filename variant
audit: allow audit code to satisfy getname requests from its names_list
vfs: define struct filename and have getname() return it
btrfs: Fix compilation with user namespace support enabled
userns: Fix posix_acl_file_xattr_userns gid conversion
userns: Properly print bluetooth socket uids
...
Diffstat (limited to 'include/linux/memcontrol.h')
| -rw-r--r-- | include/linux/memcontrol.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 8d9489fdab2e..11ddc7ffeba8 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
| @@ -84,14 +84,14 @@ extern struct mem_cgroup *parent_mem_cgroup(struct mem_cgroup *memcg); | |||
| 84 | extern struct mem_cgroup *mem_cgroup_from_cont(struct cgroup *cont); | 84 | extern struct mem_cgroup *mem_cgroup_from_cont(struct cgroup *cont); |
| 85 | 85 | ||
| 86 | static inline | 86 | static inline |
| 87 | int mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *cgroup) | 87 | bool mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *memcg) |
| 88 | { | 88 | { |
| 89 | struct mem_cgroup *memcg; | 89 | struct mem_cgroup *task_memcg; |
| 90 | int match; | 90 | bool match; |
| 91 | 91 | ||
| 92 | rcu_read_lock(); | 92 | rcu_read_lock(); |
| 93 | memcg = mem_cgroup_from_task(rcu_dereference((mm)->owner)); | 93 | task_memcg = mem_cgroup_from_task(rcu_dereference(mm->owner)); |
| 94 | match = __mem_cgroup_same_or_subtree(cgroup, memcg); | 94 | match = __mem_cgroup_same_or_subtree(memcg, task_memcg); |
| 95 | rcu_read_unlock(); | 95 | rcu_read_unlock(); |
| 96 | return match; | 96 | return match; |
| 97 | } | 97 | } |
| @@ -258,10 +258,10 @@ static inline struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm | |||
| 258 | return NULL; | 258 | return NULL; |
| 259 | } | 259 | } |
| 260 | 260 | ||
| 261 | static inline int mm_match_cgroup(struct mm_struct *mm, | 261 | static inline bool mm_match_cgroup(struct mm_struct *mm, |
| 262 | struct mem_cgroup *memcg) | 262 | struct mem_cgroup *memcg) |
| 263 | { | 263 | { |
| 264 | return 1; | 264 | return true; |
| 265 | } | 265 | } |
| 266 | 266 | ||
| 267 | static inline int task_in_mem_cgroup(struct task_struct *task, | 267 | static inline int task_in_mem_cgroup(struct task_struct *task, |
| @@ -396,7 +396,7 @@ enum { | |||
| 396 | }; | 396 | }; |
| 397 | 397 | ||
| 398 | struct sock; | 398 | struct sock; |
| 399 | #ifdef CONFIG_MEMCG_KMEM | 399 | #if defined(CONFIG_INET) && defined(CONFIG_MEMCG_KMEM) |
| 400 | void sock_update_memcg(struct sock *sk); | 400 | void sock_update_memcg(struct sock *sk); |
| 401 | void sock_release_memcg(struct sock *sk); | 401 | void sock_release_memcg(struct sock *sk); |
| 402 | #else | 402 | #else |
| @@ -406,6 +406,6 @@ static inline void sock_update_memcg(struct sock *sk) | |||
| 406 | static inline void sock_release_memcg(struct sock *sk) | 406 | static inline void sock_release_memcg(struct sock *sk) |
| 407 | { | 407 | { |
| 408 | } | 408 | } |
| 409 | #endif /* CONFIG_MEMCG_KMEM */ | 409 | #endif /* CONFIG_INET && CONFIG_MEMCG_KMEM */ |
| 410 | #endif /* _LINUX_MEMCONTROL_H */ | 410 | #endif /* _LINUX_MEMCONTROL_H */ |
| 411 | 411 | ||
