提交 ed596a8a 编写于 作者: C Chuck Lever 提交者: Trond Myklebust

NFS: Move the nfs_set_port() call out of nfs_parse_mount_options()

The remount path does not need to set the port in the server address.
Since it's not really a part of option parsing, move the nfs_set_port()
call to nfs_parse_mount_options()'s callers.
Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 259875ef
...@@ -1214,9 +1214,6 @@ static int nfs_parse_mount_options(char *raw, ...@@ -1214,9 +1214,6 @@ static int nfs_parse_mount_options(char *raw,
} }
} }
nfs_set_port((struct sockaddr *)&mnt->nfs_server.address,
mnt->nfs_server.port);
return 1; return 1;
out_nomem: out_nomem:
...@@ -1568,6 +1565,9 @@ static int nfs_validate_mount_data(void *options, ...@@ -1568,6 +1565,9 @@ static int nfs_validate_mount_data(void *options,
&args->nfs_server.address)) &args->nfs_server.address))
goto out_no_address; goto out_no_address;
nfs_set_port((struct sockaddr *)&args->nfs_server.address,
args->nfs_server.port);
nfs_set_mount_transport_protocol(args); nfs_set_mount_transport_protocol(args);
status = nfs_parse_devname(dev_name, status = nfs_parse_devname(dev_name,
...@@ -2197,6 +2197,9 @@ static int nfs4_validate_mount_data(void *options, ...@@ -2197,6 +2197,9 @@ static int nfs4_validate_mount_data(void *options,
&args->nfs_server.address)) &args->nfs_server.address))
return -EINVAL; return -EINVAL;
nfs_set_port((struct sockaddr *)&args->nfs_server.address,
args->nfs_server.port);
nfs_validate_transport_protocol(args); nfs_validate_transport_protocol(args);
switch (args->auth_flavor_len) { switch (args->auth_flavor_len) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册