Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1399672

[PATCH] kernfs: kernfs_sop_show_path: don't return 0 after seq_dentry call

From "Serge E. Hallyn" <serge.hallyn@ubuntu.com>
Newsgroups linux.kernel
Subject [PATCH] kernfs: kernfs_sop_show_path: don't return 0 after seq_dentry call
Date 2016-05-12 07:30 +0200
Message-ID <rxRma-7la-1@gated-at.bofh.it> (permalink)
References <rxMwa-2kB-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 fs/kernfs/mount.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c
index 3b78724..3d670a3 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 = {
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: cgroup, kernfs: make mountinfo show properly scoped path for  cgroup namespaces Andrei Vagin <avagin@gmail.com> - 2016-05-12 02:20 +0200
  [PATCH] kernfs: kernfs_sop_show_path: don't return 0 after  seq_dentry call "Serge E. Hallyn" <serge.hallyn@ubuntu.com> - 2016-05-12 07:30 +0200
    Re: [PATCH] kernfs: kernfs_sop_show_path: don't return 0 after  seq_dentry call Tejun Heo <tj@kernel.org> - 2016-05-12 17:10 +0200

csiph-web