diff options
| author | Johannes Weiner <hannes@cmpxchg.org> | 2015-02-11 18:26:03 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 20:06:02 -0500 |
| commit | 650c5e565492f9092552bfe4d65935196c7d9567 (patch) | |
| tree | 5fce0f701502f4b75339d4c53b37301d3db65fdb /include/linux | |
| parent | 8d29e18a459dfc2adeafc1acb9c4185ee6713116 (diff) | |
mm: page_counter: pull "-1" handling out of page_counter_memparse()
The unified hierarchy interface for memory cgroups will no longer use "-1"
to mean maximum possible resource value. In preparation for this, make
the string an argument and let the caller supply it.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: Vladimir Davydov <vdavydov@parallels.com>
Cc: Greg Thelen <gthelen@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/page_counter.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/page_counter.h b/include/linux/page_counter.h index 955421575d16..17fa4f8de3a6 100644 --- a/include/linux/page_counter.h +++ b/include/linux/page_counter.h | |||
| @@ -41,7 +41,8 @@ int page_counter_try_charge(struct page_counter *counter, | |||
| 41 | struct page_counter **fail); | 41 | struct page_counter **fail); |
| 42 | void page_counter_uncharge(struct page_counter *counter, unsigned long nr_pages); | 42 | void page_counter_uncharge(struct page_counter *counter, unsigned long nr_pages); |
| 43 | int page_counter_limit(struct page_counter *counter, unsigned long limit); | 43 | int page_counter_limit(struct page_counter *counter, unsigned long limit); |
| 44 | int page_counter_memparse(const char *buf, unsigned long *nr_pages); | 44 | int page_counter_memparse(const char *buf, const char *max, |
| 45 | unsigned long *nr_pages); | ||
| 45 | 46 | ||
| 46 | static inline void page_counter_reset_watermark(struct page_counter *counter) | 47 | static inline void page_counter_reset_watermark(struct page_counter *counter) |
| 47 | { | 48 | { |
