summaryrefslogtreecommitdiff
path: root/fs/kernfs
diff options
context:
space:
mode:
authorSerge E. Hallyn <serge.hallyn@ubuntu.com>2016-05-12 00:29:45 -0500
committerTejun Heo <tj@kernel.org>2016-05-12 11:03:51 -0400
commit3cc9b23c8137e9bb4eaf6d97d825b7f0dc711d0c (patch)
tree163de7cbd4f1589c6f72e46e56547712c4eead62 /fs/kernfs
parent4f41fc59620fcedaa97cbdf3d7d2956d80fcd922 (diff)
downloadlwn-3cc9b23c8137e9bb4eaf6d97d825b7f0dc711d0c.tar.gz
lwn-3cc9b23c8137e9bb4eaf6d97d825b7f0dc711d0c.zip
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: Andrei Vagin <avagin@gmail.com> Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'fs/kernfs')
-rw-r--r--fs/kernfs/mount.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c
index 3b78724c1979..3d670a3678f2 100644
--- a/fs/kernfs/mount.c
+++ b/fs/kernfs/mount.c
@@ -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 = {