Commit 46cfeb04 authored by Tejun Heo's avatar Tejun Heo
Browse files

cgroup: use release_agent_path_lock in cgroup_release_agent_show()

release_path is now protected by release_agent_path_lock to allow
accessing it without grabbing cgroup_mutex; however,
cgroup_release_agent_show() was still grabbing cgroup_mutex.  Let's
convert it to release_agent_path_lock so that we don't have to worry
about this one for the planned locking updates.

Signed-off-by: default avatarTejun Heo <>
Acked-by: default avatarLi Zefan <>
parent 7d331fa9
...@@ -2373,11 +2373,10 @@ static int cgroup_release_agent_show(struct seq_file *seq, void *v) ...@@ -2373,11 +2373,10 @@ static int cgroup_release_agent_show(struct seq_file *seq, void *v)
{ {
struct cgroup *cgrp = seq_css(seq)->cgroup; struct cgroup *cgrp = seq_css(seq)->cgroup;
if (!cgroup_lock_live_group(cgrp)) spin_lock(&release_agent_path_lock);
return -ENODEV;
seq_puts(seq, cgrp->root->release_agent_path); seq_puts(seq, cgrp->root->release_agent_path);
seq_putc(seq, '\n'); seq_putc(seq, '\n');
return 0; return 0;
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment