aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-09-04 11:05:07 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-02 10:30:19 -0700
commit3672dff93b8c5c7d2ebaf18eb32c98b06e942dac (patch)
tree0f9a91e2be5d66e3769f9a65e367307f625611c4 /fs/nfs/super.c
parentf15e72437813a8943aaa3f7528e464923c31437f (diff)
NFS: Fix a problem with the legacy binary mount code
commit 872ece86ea5c367aa92f44689c2d01a1c767aeb3 upstream. Apparently, am-utils is still using the legacy binary mountdata interface, and is having trouble parsing /proc/mounts due to the 'port=' field being incorrectly set. The following patch should fix up the regression. Reported-by: Marius Tolzmann <tolzmann@molgen.mpg.de> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 7b55f51137e..5976e243d24 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1886,6 +1886,7 @@ static int nfs_validate_mount_data(void *options,
memcpy(sap, &data->addr, sizeof(data->addr));
args->nfs_server.addrlen = sizeof(data->addr);
+ args->nfs_server.port = ntohs(data->addr.sin_port);
if (!nfs_verify_server_address(sap))
goto out_no_address;
@@ -2598,6 +2599,7 @@ static int nfs4_validate_mount_data(void *options,
return -EFAULT;
if (!nfs_verify_server_address(sap))
goto out_no_address;
+ args->nfs_server.port = ntohs(((struct sockaddr_in *)sap)->sin_port);
if (data->auth_flavourlen) {
if (data->auth_flavourlen > 1)