diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-06-05 09:54:49 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-06-05 09:54:49 +0200 |
commit | 4241119eeb14f762e2d7f6e7c52afd22cea1de37 (patch) | |
tree | 655a153ca0517acb93b1eea776bad49ce5d8b050 /mm/slub.c | |
parent | e73ad5ff2f76da25390e9607cb549691639330c3 (diff) | |
parent | 3c2993b8c6143d8a5793746a54eba8f86f95240f (diff) | |
download | linux-4241119eeb14f762e2d7f6e7c52afd22cea1de37.tar.gz linux-4241119eeb14f762e2d7f6e7c52afd22cea1de37.tar.bz2 linux-4241119eeb14f762e2d7f6e7c52afd22cea1de37.zip |
Merge tag 'v4.12-rc4' into x86/mm, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/slub.c b/mm/slub.c index 57e5156f02be..7449593fca72 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -5512,6 +5512,7 @@ static void memcg_propagate_slab_attrs(struct kmem_cache *s) char mbuf[64]; char *buf; struct slab_attribute *attr = to_slab_attr(slab_attrs[i]); + ssize_t len; if (!attr || !attr->store || !attr->show) continue; @@ -5536,8 +5537,9 @@ static void memcg_propagate_slab_attrs(struct kmem_cache *s) buf = buffer; } - attr->show(root_cache, buf); - attr->store(s, buf, strlen(buf)); + len = attr->show(root_cache, buf); + if (len > 0) + attr->store(s, buf, len); } if (buffer) |