if we get BlockIOReadBandwidth="", we should only remove the
read-bandwidth-entries in blockio_device_bandwidths list.
CGroupContext *c = data;
const char *bandwidth;
off_t bytes;
CGroupContext *c = data;
const char *bandwidth;
off_t bytes;
assert(lvalue);
assert(rvalue);
assert(lvalue);
assert(rvalue);
+ read = streq("BlockIOReadBandwidth", lvalue);
+
- while (c->blockio_device_bandwidths)
- cgroup_context_free_blockio_device_bandwidth(c, c->blockio_device_bandwidths);
+ CGroupBlockIODeviceBandwidth *next;
+
+ LIST_FOREACH_SAFE (device_bandwidths, b, next, c->blockio_device_bandwidths)
+ if (b->read == read)
+ cgroup_context_free_blockio_device_bandwidth(c, b);
b->path = path;
path = NULL;
b->bandwidth = (uint64_t) bytes;
b->path = path;
path = NULL;
b->bandwidth = (uint64_t) bytes;
- b->read = streq("BlockIOReadBandwidth", lvalue);
LIST_PREPEND(CGroupBlockIODeviceBandwidth, device_bandwidths, c->blockio_device_bandwidths, b);
LIST_PREPEND(CGroupBlockIODeviceBandwidth, device_bandwidths, c->blockio_device_bandwidths, b);