Commit bcd2ea17da6a329a7276cde7286d802f009af332
1 parent
f5855fecda
Exists in
master
and in
7 other branches
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>
Showing 1 changed file with 4 additions and 2 deletions Side-by-side Diff
fs/nfs/super.c
... | ... | @@ -1846,9 +1846,10 @@ |
1846 | 1846 | data->acdirmin != nfss->acdirmin / HZ || |
1847 | 1847 | data->acdirmax != nfss->acdirmax / HZ || |
1848 | 1848 | data->timeo != (10U * nfss->client->cl_timeout->to_initval / HZ) || |
1849 | + data->nfs_server.port != nfss->port || | |
1849 | 1850 | data->nfs_server.addrlen != nfss->nfs_client->cl_addrlen || |
1850 | - memcmp(&data->nfs_server.address, &nfss->nfs_client->cl_addr, | |
1851 | - data->nfs_server.addrlen) != 0) | |
1851 | + !rpc_cmp_addr(&data->nfs_server.address, | |
1852 | + &nfss->nfs_client->cl_addr)) | |
1852 | 1853 | return -EINVAL; |
1853 | 1854 | |
1854 | 1855 | return 0; |
... | ... | @@ -1891,6 +1892,7 @@ |
1891 | 1892 | data->acdirmin = nfss->acdirmin / HZ; |
1892 | 1893 | data->acdirmax = nfss->acdirmax / HZ; |
1893 | 1894 | data->timeo = 10U * nfss->client->cl_timeout->to_initval / HZ; |
1895 | + data->nfs_server.port = nfss->port; | |
1894 | 1896 | data->nfs_server.addrlen = nfss->nfs_client->cl_addrlen; |
1895 | 1897 | memcpy(&data->nfs_server.address, &nfss->nfs_client->cl_addr, |
1896 | 1898 | data->nfs_server.addrlen); |