diff options
| author | Serge E. Hallyn <serge.hallyn@ubuntu.com> | 2016-05-12 00:29:45 -0500 |
|---|---|---|
| committer | Bruno Martins <bgcngm@gmail.com> | 2022-10-28 15:39:24 +0100 |
| commit | dc81f3963dde5a6193f69cafa8ec73e7ba72223f (patch) | |
| tree | 645a4320389c6b739e9c36713b093d32a358a472 | |
| parent | ce9a52e20897955fac0c3586b9ab66e7947c0a70 (diff) | |
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>
Change-Id: I3cf5886bf7a77a943a6540c4b224dd0ca805dca6
| -rw-r--r-- | fs/kernfs/mount.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c index ef34e31a9d57..a71e996d6c55 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 = { |
