From: Jeff Layton <jlayton@kernel.org>
To: chuck.lever@oracle.com
Cc: tom@talpey.com, linux-nfs@vger.kernel.org
Subject: [PATCH v3 1/3] nfsd: ignore requests to disable unsupported versions
Date: Tue, 18 Oct 2022 07:47:54 -0400 [thread overview]
Message-ID: <20221018114756.23679-1-jlayton@kernel.org> (raw)
The kernel currently errors out if you attempt to enable or disable a
version that it doesn't recognize. Change it to ignore attempts to
disable an unrecognized version. If we don't support it, then there is
no harm in doing so.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/nfsd/nfsctl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index dc74a947a440..68ed42fd29fc 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -601,7 +601,9 @@ static ssize_t __write_versions(struct file *file, char *buf, size_t size)
}
break;
default:
- return -EINVAL;
+ /* Ignore requests to disable non-existent versions */
+ if (cmd == NFSD_SET)
+ return -EINVAL;
}
vers += len + 1;
} while ((len = qword_get(&mesg, vers, size)) > 0);
--
2.37.3
next reply other threads:[~2022-10-18 11:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 11:47 Jeff Layton [this message]
2022-10-18 11:47 ` [PATCH v3 2/3] nfsd: move nfserrno() to vfs.c Jeff Layton
2022-10-18 11:47 ` [PATCH v3 3/3] nfsd: allow disabling NFSv2 at compile time Jeff Layton
2022-10-19 15:09 ` Tom Talpey
2022-10-19 16:23 ` Jeff Layton
2022-10-19 14:58 ` [PATCH v3 1/3] nfsd: ignore requests to disable unsupported versions Tom Talpey
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=20221018114756.23679-1-jlayton@kernel.org \
--to=jlayton@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=tom@talpey.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).