|
@@ -5512,6 +5512,7 @@ static void memcg_propagate_slab_attrs(struct kmem_cache *s)
|
|
char mbuf[64];
|
|
char mbuf[64];
|
|
char *buf;
|
|
char *buf;
|
|
struct slab_attribute *attr = to_slab_attr(slab_attrs[i]);
|
|
struct slab_attribute *attr = to_slab_attr(slab_attrs[i]);
|
|
|
|
+ ssize_t len;
|
|
|
|
|
|
if (!attr || !attr->store || !attr->show)
|
|
if (!attr || !attr->store || !attr->show)
|
|
continue;
|
|
continue;
|
|
@@ -5536,8 +5537,9 @@ static void memcg_propagate_slab_attrs(struct kmem_cache *s)
|
|
buf = buffer;
|
|
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)
|
|
if (buffer)
|