Martin Kaiser b322bf9e98 nfs: keep server info for remounts
With newer kernels that use fs_context for nfs mounts, remounts fail with
-EINVAL.

$ mount -t nfs -o nolock 10.0.0.1:/tmp/test /mnt/test/
$ mount -t nfs -o remount /mnt/test/
mount: mounting 10.0.0.1:/tmp/test on /mnt/test failed: Invalid argument

For remounts, the nfs server address and port are populated by
nfs_init_fs_context and later overwritten with 0x00 bytes by
nfs23_parse_monolithic. The remount then fails as the server address is
invalid.

Fix this by not overwriting nfs server info in nfs23_parse_monolithic if
we're doing a remount.

Fixes: f2aedb713c28 ("NFS: Add fs_context support.")
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
2024-05-20 11:37:15 -04:00
..
2024-01-10 16:13:57 -08:00
2024-03-16 11:44:00 -07:00
2024-03-16 11:44:00 -07:00
2024-04-29 12:07:37 -07:00
2023-03-06 09:57:12 +01:00
2024-03-09 09:14:51 -05:00
2023-03-06 09:57:12 +01:00
2024-03-16 11:44:00 -07:00
2024-03-09 09:14:51 -05:00
2024-03-16 11:44:00 -07:00
2024-03-16 11:44:00 -07:00
2023-10-09 16:24:20 +02:00
2022-05-09 16:36:48 -04:00
2023-08-19 10:26:29 -04:00
2024-03-16 11:44:00 -07:00