From: Steve Dickson Date: Sat, 3 Nov 2007 14:36:36 +0000 (-0400) Subject: When following a list of mount versions to probe - X-Git-Tag: nfs-utils-1-1-2~32 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=812a43c1e4e055ee684ab95b28b41f0c16cc52fd When following a list of mount versions to probe - e.g. probe_mnt1_first or probe_mnt3_first - probe_both will first probe the appropriate NFS version and then, if that succeeds, probe the actual mount version. However instead of probing the target mount version, it probes the "most appropriate" mount version for the given NFS version. This results in it probing: NFSv2, MOUNTv1 twice rather than NFSv2, MOUNTv1 NFSv2, MOUNTv2 as would be more correct. This patch removes the "choose most correct" step and just use the current mouint version for the probe_vers array. Signed-off-by: Neil Brown Signed-off-by: Steve Dickson --- diff --git a/utils/mount/network.c b/utils/mount/network.c index 2b09457..38d0135 100644 --- a/utils/mount/network.c +++ b/utils/mount/network.c @@ -494,7 +494,7 @@ int probe_bothports(clnt_addr_t *mnt_server, clnt_addr_t *nfs_server) for (; *probe_vers; probe_vers++) { nfs_pmap->pm_vers = mntvers_to_nfs(*probe_vers); if ((res = probe_nfsport(nfs_server) != 0)) { - mnt_pmap->pm_vers = nfsvers_to_mnt(nfs_pmap->pm_vers); + mnt_pmap->pm_vers = *probe_vers; if ((res = probe_mntport(mnt_server)) != 0) return 1; memcpy(mnt_pmap, &save_mnt, sizeof(*mnt_pmap));