Commit 57acc40d authored by Jeff Layton's avatar Jeff Layton Committed by Trond Myklebust

nfs: reject version and minorversion changes on remount attempts

Reported-by: default avatarEric Doutreleau <edoutreleau@genoscope.cns.fr>
Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 3660cd43
...@@ -2143,6 +2143,8 @@ nfs_compare_remount_data(struct nfs_server *nfss, ...@@ -2143,6 +2143,8 @@ nfs_compare_remount_data(struct nfs_server *nfss,
if (data->flags != nfss->flags || if (data->flags != nfss->flags ||
data->rsize != nfss->rsize || data->rsize != nfss->rsize ||
data->wsize != nfss->wsize || data->wsize != nfss->wsize ||
data->version != nfss->nfs_client->rpc_ops->version ||
data->minorversion != nfss->nfs_client->cl_minorversion ||
data->retrans != nfss->client->cl_timeout->to_retries || data->retrans != nfss->client->cl_timeout->to_retries ||
data->auth_flavors[0] != nfss->client->cl_auth->au_flavor || data->auth_flavors[0] != nfss->client->cl_auth->au_flavor ||
data->acregmin != nfss->acregmin / HZ || data->acregmin != nfss->acregmin / HZ ||
...@@ -2197,6 +2199,8 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data) ...@@ -2197,6 +2199,8 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data)
data->timeo = 10U * nfss->client->cl_timeout->to_initval / HZ; data->timeo = 10U * nfss->client->cl_timeout->to_initval / HZ;
data->nfs_server.port = nfss->port; data->nfs_server.port = nfss->port;
data->nfs_server.addrlen = nfss->nfs_client->cl_addrlen; data->nfs_server.addrlen = nfss->nfs_client->cl_addrlen;
data->version = nfsvers;
data->minorversion = nfss->nfs_client->cl_minorversion;
memcpy(&data->nfs_server.address, &nfss->nfs_client->cl_addr, memcpy(&data->nfs_server.address, &nfss->nfs_client->cl_addr,
data->nfs_server.addrlen); data->nfs_server.addrlen);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment