summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2008-06-26 17:47:05 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-07-09 12:09:39 -0400
commited596a8adb7964cf9d2f7682f9cf2c37322a775d (patch)
tree8a409a671afc5b8fe17eceefdf335a739c096081 /fs/nfs
parent259875efed06d6936f54c9a264e868937f1bc217 (diff)
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: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/super.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 9c1a960f5b94..de424d2f3155 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -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;
out_nomem:
@@ -1568,6 +1565,9 @@ static int nfs_validate_mount_data(void *options,
&args->nfs_server.address))
goto out_no_address;
+ nfs_set_port((struct sockaddr *)&args->nfs_server.address,
+ args->nfs_server.port);
+
nfs_set_mount_transport_protocol(args);
status = nfs_parse_devname(dev_name,
@@ -2197,6 +2197,9 @@ static int nfs4_validate_mount_data(void *options,
&args->nfs_server.address))
return -EINVAL;
+ nfs_set_port((struct sockaddr *)&args->nfs_server.address,
+ args->nfs_server.port);
+
nfs_validate_transport_protocol(args);
switch (args->auth_flavor_len) {