From: "Serge E. Hallyn" <serge.hallyn@ubuntu.com>
To: Andrei Vagin <avagin@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, Tejun Heo <tj@kernel.org>,
Serge Hallyn <serge.hallyn@ubuntu.com>
Subject: [PATCH] kernfs: kernfs_sop_show_path: don't return 0 after seq_dentry call
Date: Thu, 12 May 2016 00:29:45 -0500 [thread overview]
Message-ID: <20160512052945.GA30046@mail.hallyn.com> (raw)
In-Reply-To: <CANaxB-xu_QkWixPMUM=tHcCM3mnchtKvmrQUcx9MZx3QAdzkYg@mail.gmail.com>
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
next prev parent reply other threads:[~2016-05-12 5:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-12 0:10 cgroup, kernfs: make mountinfo show properly scoped path for cgroup namespaces Andrei Vagin
2016-05-12 5:29 ` Serge E. Hallyn [this message]
2016-05-12 15:02 ` [PATCH] kernfs: kernfs_sop_show_path: don't return 0 after seq_dentry call Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160512052945.GA30046@mail.hallyn.com \
--to=serge.hallyn@ubuntu.com \
--cc=avagin@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox