From: Scott Mayhew <smayhew@redhat.com>
To: trond.myklebust@primarydata.com, anna.schumaker@netapp.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH v2] nfs: only show mountproto in /proc/mounts if set
Date: Tue, 15 Nov 2016 15:59:52 -0500 [thread overview]
Message-ID: <1479243592-38858-1-git-send-email-smayhew@redhat.com> (raw)
The nfs_server->mountd_protocol field doesn't get set when a v3 submount
is created, causing /proc/mounts to show 'mountproto=' without a netid.
This in turn causes umount.nfs to emit the error message "Failed to find
'' protocol" if you manually unmount the submount.
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
fs/nfs/super.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 001796b..b60946d 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -532,7 +532,8 @@ static void nfs_show_mountd_netid(struct seq_file *m, struct nfs_server *nfss,
{
struct sockaddr *sap = (struct sockaddr *) &nfss->mountd_address;
- seq_printf(m, ",mountproto=");
+ if (nfss->mountd_protocol || showdefaults)
+ seq_printf(m, ",mountproto=");
switch (sap->sa_family) {
case AF_INET:
switch (nfss->mountd_protocol) {
--
2.4.11
next reply other threads:[~2016-11-15 20:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-15 20:59 Scott Mayhew [this message]
2016-11-15 21:28 ` [PATCH v2] nfs: only show mountproto in /proc/mounts if set Trond Myklebust
2016-11-16 13:55 ` Scott Mayhew
2016-12-07 17:03 ` Scott Mayhew
2017-01-13 0:04 ` [PATCH] NFS: tidy up nfs_show_mountd_netid NeilBrown
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=1479243592-38858-1-git-send-email-smayhew@redhat.com \
--to=smayhew@redhat.com \
--cc=anna.schumaker@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@primarydata.com \
/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;
as well as URLs for NNTP newsgroup(s).