diff options
author | Tejun Heo <tj@kernel.org> | 2013-12-05 12:28:02 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-12-05 12:28:02 -0500 |
commit | e92e113cabc1d3e47dc4740a814adb413f022e2f (patch) | |
tree | 35ad59655576ae0710aec974be89fc580fa4cdb0 /net | |
parent | 791badbdb3e4fc1001ee3bcdaedc6d4f167fcbe8 (diff) |
netprio_cgroup: convert away from cftype->read_map()
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/netprio_cgroup.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c index 9b7cf6c85f82..498710dce4a5 100644 --- a/net/core/netprio_cgroup.c +++ b/net/core/netprio_cgroup.c | |||
@@ -174,13 +174,13 @@ static u64 read_prioidx(struct cgroup_subsys_state *css, struct cftype *cft) | |||
174 | } | 174 | } |
175 | 175 | ||
176 | static int read_priomap(struct cgroup_subsys_state *css, struct cftype *cft, | 176 | static int read_priomap(struct cgroup_subsys_state *css, struct cftype *cft, |
177 | struct cgroup_map_cb *cb) | 177 | struct seq_file *sf) |
178 | { | 178 | { |
179 | struct net_device *dev; | 179 | struct net_device *dev; |
180 | 180 | ||
181 | rcu_read_lock(); | 181 | rcu_read_lock(); |
182 | for_each_netdev_rcu(&init_net, dev) | 182 | for_each_netdev_rcu(&init_net, dev) |
183 | cb->fill(cb, dev->name, netprio_prio(css, dev)); | 183 | seq_printf(sf, "%s %u\n", dev->name, netprio_prio(css, dev)); |
184 | rcu_read_unlock(); | 184 | rcu_read_unlock(); |
185 | return 0; | 185 | return 0; |
186 | } | 186 | } |
@@ -238,7 +238,7 @@ static struct cftype ss_files[] = { | |||
238 | }, | 238 | }, |
239 | { | 239 | { |
240 | .name = "ifpriomap", | 240 | .name = "ifpriomap", |
241 | .read_map = read_priomap, | 241 | .read_seq_string = read_priomap, |
242 | .write_string = write_priomap, | 242 | .write_string = write_priomap, |
243 | }, | 243 | }, |
244 | { } /* terminate */ | 244 | { } /* terminate */ |