Commit 3cc9b23c authored by Serge E. Hallyn's avatar Serge E. Hallyn Committed by Tejun Heo

kernfs: kernfs_sop_show_path: don't return 0 after seq_dentry call

Our caller expects 0 on success, not >0.

This fixes a bug in the patch

	cgroup, kernfs: make mountinfo show properly scoped path for cgroup namespaces

where /sys does not show up in mountinfo, breaking criu.

Thanks for catching this, Andrei.
Reported-by: default avatarAndrei Vagin <avagin@gmail.com>
Signed-off-by: default avatarSerge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 4f41fc59
...@@ -50,7 +50,8 @@ static int kernfs_sop_show_path(struct seq_file *sf, struct dentry *dentry) ...@@ -50,7 +50,8 @@ static int kernfs_sop_show_path(struct seq_file *sf, struct dentry *dentry)
if (scops && scops->show_path) if (scops && scops->show_path)
return scops->show_path(sf, node, root); return scops->show_path(sf, node, root);
return seq_dentry(sf, dentry, " \t\n\\"); seq_dentry(sf, dentry, " \t\n\\");
return 0;
} }
const struct super_operations kernfs_sops = { const struct super_operations kernfs_sops = {
......
Markdown is supported
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