summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2009-12-07 17:23:48 -0500
committerSteve Dickson <steved@redhat.com>2009-12-07 17:23:48 -0500
commit26a14b65991b79d317638f78dc6b4e5ac1ef712e (patch)
treef8451599996f96cbee814c855c3a0255f662a401
parent77997a364006619874a4585c6821da24666dbaa9 (diff)
downloadnfs-utils-26a14b65991b79d317638f78dc6b4e5ac1ef712e.tar.gz
nfs-utils-26a14b65991b79d317638f78dc6b4e5ac1ef712e.tar.xz
nfs-utils-26a14b65991b79d317638f78dc6b4e5ac1ef712e.zip
mount.nfs: Retry v4 mounts with v3 on ENOENT errors
Retry v4 mounts with a v3 mount when the version is not explicitly specified and the mount fails with ENOENT. The will help deal with Linux servers that do not automatically export a pseudo root Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--utils/mount/stropts.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
index a0b9e7f..4007150 100644
--- a/utils/mount/stropts.c
+++ b/utils/mount/stropts.c
@@ -668,9 +668,10 @@ static int nfs_try_mount(struct nfsmount_info *mi)
/*
* To deal with legacy Linux servers that don't
* automatically export a pseudo root, retry
- * ENOENT errors using version 3
+ * ENOENT errors using version 3. And for
+ * Linux servers prior to 2.6.25, retry EPERM
*/
- if (errno != ENOENT)
+ if (errno != ENOENT && errno != EPERM)
break;
}
}