diff options
author | Steve Dickson <steved@redhat.com> | 2009-11-03 09:49:03 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2009-11-03 09:49:03 -0500 |
commit | e1eccc5fc317f73801522b3b498c6dab67b048d2 (patch) | |
tree | f719b40526de81c1670c02648df163ae9ed41d8d | |
parent | 1af166179c3f28fa9943f7844e03032f3bdae7ea (diff) | |
download | nfs-utils-e1eccc5fc317f73801522b3b498c6dab67b048d2.tar.gz nfs-utils-e1eccc5fc317f73801522b3b498c6dab67b048d2.tar.xz nfs-utils-e1eccc5fc317f73801522b3b498c6dab67b048d2.zip |
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.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c index 7b63b45..709f0ff 100644 --- a/utils/mount/stropts.c +++ b/utils/mount/stropts.c @@ -628,8 +628,15 @@ static int nfs_try_mount(struct nfsmount_info *mi) if (linux_version_code() > MAKE_VERSION(2, 6, 31)) { errno = 0; result = nfs_try_mount_v4(mi); - if (errno != EPROTONOSUPPORT) - break; + if (errno != EPROTONOSUPPORT) { + /* + * To deal with legacy Linux servers that don't + * automatically export a pseudo root, retry + * ENOENT errors using version 3 + */ + if (errno != ENOENT) + break; + } } case 2: case 3: |