mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09: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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0a49efb948
commit
bfef0cfab4
@@ -601,7 +601,9 @@ static ssize_t __write_versions(struct file *file, char *buf, size_t size)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
/* Ignore requests to disable non-existent versions */
|
||||||
|
if (cmd == NFSD_SET)
|
||||||
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
vers += len + 1;
|
vers += len + 1;
|
||||||
} while ((len = qword_get(&mesg, vers, size)) > 0);
|
} while ((len = qword_get(&mesg, vers, size)) > 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user