]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
When following a list of mount versions to probe -
authorSteve Dickson <steved@redhat.com>
Sat, 3 Nov 2007 14:36:36 +0000 (10:36 -0400)
committerSteve Dickson <steved@redhat.com>
Sat, 3 Nov 2007 14:36:36 +0000 (10:36 -0400)
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 <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/mount/network.c

index 2b09457524e9fa0754c3e93115456c6b5ca82407..38d0135b799000ea7c70814fe6f57a0a86783220 100644 (file)
@@ -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));