diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-10-06 15:41:22 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-10-06 15:41:22 -0400 |
commit | bcd2ea17da6a329a7276cde7286d802f009af332 (patch) | |
tree | 11344feb0c0c23175844b0cb86da589146e21370 /fs/nfs/super.c | |
parent | f5855fecda65c1965c894915ace1e086d4925154 (diff) |
NFS: Fix port initialisation in nfs_remount()
The recent changeset 53a0b9c4c99ab0085a06421f71592722e5b3fd5f (NFS: Replace
nfs_parse_ip_address() with rpc_pton()) broke nfs_remount, since the call
to rpc_pton() will zero out the port number in data->nfs_server.address.
This is actually due to a bug in nfs_remount: it should be looking at the
port number in nfs_server.port instead...
This fixes bug
http://bugzilla.kernel.org/show_bug.cgi?id=14276
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r-- | fs/nfs/super.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 0d14704c539e..fb3b280cacfe 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -1846,9 +1846,10 @@ nfs_compare_remount_data(struct nfs_server *nfss, | |||
1846 | data->acdirmin != nfss->acdirmin / HZ || | 1846 | data->acdirmin != nfss->acdirmin / HZ || |
1847 | data->acdirmax != nfss->acdirmax / HZ || | 1847 | data->acdirmax != nfss->acdirmax / HZ || |
1848 | data->timeo != (10U * nfss->client->cl_timeout->to_initval / HZ) || | 1848 | data->timeo != (10U * nfss->client->cl_timeout->to_initval / HZ) || |
1849 | data->nfs_server.port != nfss->port || | ||
1849 | data->nfs_server.addrlen != nfss->nfs_client->cl_addrlen || | 1850 | data->nfs_server.addrlen != nfss->nfs_client->cl_addrlen || |
1850 | memcmp(&data->nfs_server.address, &nfss->nfs_client->cl_addr, | 1851 | !rpc_cmp_addr(&data->nfs_server.address, |
1851 | data->nfs_server.addrlen) != 0) | 1852 | &nfss->nfs_client->cl_addr)) |
1852 | return -EINVAL; | 1853 | return -EINVAL; |
1853 | 1854 | ||
1854 | return 0; | 1855 | return 0; |
@@ -1891,6 +1892,7 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data) | |||
1891 | data->acdirmin = nfss->acdirmin / HZ; | 1892 | data->acdirmin = nfss->acdirmin / HZ; |
1892 | data->acdirmax = nfss->acdirmax / HZ; | 1893 | data->acdirmax = nfss->acdirmax / HZ; |
1893 | data->timeo = 10U * nfss->client->cl_timeout->to_initval / HZ; | 1894 | data->timeo = 10U * nfss->client->cl_timeout->to_initval / HZ; |
1895 | data->nfs_server.port = nfss->port; | ||
1894 | data->nfs_server.addrlen = nfss->nfs_client->cl_addrlen; | 1896 | data->nfs_server.addrlen = nfss->nfs_client->cl_addrlen; |
1895 | memcpy(&data->nfs_server.address, &nfss->nfs_client->cl_addr, | 1897 | memcpy(&data->nfs_server.address, &nfss->nfs_client->cl_addr, |
1896 | data->nfs_server.addrlen); | 1898 | data->nfs_server.addrlen); |