Skip to content

Commit

Permalink
kernfs: kernfs_sop_show_path: don't return 0 after seq_dentry call
Browse files Browse the repository at this point in the history
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: Andrei Vagin <avagin@gmail.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Serge E. Hallyn authored and Tejun Heo committed May 12, 2016
1 parent 4f41fc5 commit 3cc9b23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/kernfs/mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ static int kernfs_sop_show_path(struct seq_file *sf, struct dentry *dentry)
if (scops && scops->show_path)
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 = {
Expand Down

0 comments on commit 3cc9b23

Please sign in to comment.