Commit 8e823baf authored by Jeff Layton's avatar Jeff Layton Committed by Chuck Lever
Browse files

nfsd: ignore requests to disable unsupported versions



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: default avatarJeff Layton <jlayton@kernel.org>
Reviewed-by: default avatarTom Talpey <tom@talpey.com>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 841fd0a3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;