mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 05:44:11 +00:00
nfsd: ignore requests to disable unsupported versions
[ Upstream commit 8e823bafff
]
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>
Reviewed-by: Tom Talpey <tom@talpey.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
parent
1c2f1a171b
commit
3b623a6a12
1 changed files with 3 additions and 1 deletions
|
@ -601,6 +601,8 @@ static ssize_t __write_versions(struct file *file, char *buf, size_t size)
|
|||
}
|
||||
break;
|
||||
default:
|
||||
/* Ignore requests to disable non-existent versions */
|
||||
if (cmd == NFSD_SET)
|
||||
return -EINVAL;
|
||||
}
|
||||
vers += len + 1;
|
||||
|
|
Loading…
Reference in a new issue