In preparation of conversion to kernfs, cgroup file handling is being
consolidated so that it can be easily mapped to the seq_file based
interface of kernfs.
cftype->read_map() doesn't add any value and being replaced with
->read_seq_string(). Update read_priomap() to use ->read_seq_string()
instead.
This patch doesn't make any visible behavior changes.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Acked-by: Li Zefan <lizefan@huawei.com>
}
static int read_priomap(struct cgroup_subsys_state *css, struct cftype *cft,
}
static int read_priomap(struct cgroup_subsys_state *css, struct cftype *cft,
- struct cgroup_map_cb *cb)
{
struct net_device *dev;
rcu_read_lock();
for_each_netdev_rcu(&init_net, dev)
{
struct net_device *dev;
rcu_read_lock();
for_each_netdev_rcu(&init_net, dev)
- cb->fill(cb, dev->name, netprio_prio(css, dev));
+ seq_printf(sf, "%s %u\n", dev->name, netprio_prio(css, dev));
rcu_read_unlock();
return 0;
}
rcu_read_unlock();
return 0;
}
},
{
.name = "ifpriomap",
},
{
.name = "ifpriomap",
- .read_map = read_priomap,
+ .read_seq_string = read_priomap,
.write_string = write_priomap,
},
{ } /* terminate */
.write_string = write_priomap,
},
{ } /* terminate */