[systemd-devel] [PATCH 1/3] blkio bandwidth: don't clean up all of entries in blockio_device_bandwidths list
Lennart Poettering
lennart at poettering.net
Tue Sep 10 08:13:27 PDT 2013
On Fri, 30.08.13 10:56, Gao feng (gaofeng at cn.fujitsu.com) wrote:
> if we get BlockIOReadBandwidth="", we should only remove the
> read-bandwidth-entries in blockio_device_bandwidths list.
Thanks! Applied, though with one change:
> + read = streq("BlockIOReadBandwidth", lvalue);
> +
> if (isempty(rvalue)) {
> - 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) {
> + LIST_REMOVE(CGroupBlockIODeviceBandwidth, device_bandwidths, c->blockio_device_bandwidths, b);
> + free(b->path);
> + free(b);
I replaced the three previous lines with an invocation of
cgroup_context_free_blockio_device_bandwidth() again.
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list