Skip to content

Commit

Permalink
NFS: Move the nfs_set_port() call out of nfs_parse_mount_options()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
  • Loading branch information
chucklever authored and Trond Myklebust committed Jul 9, 2008
1 parent 259875e commit ed596a8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit ed596a8

Please sign in to comment.