diff options
author | NeilBrown <neilb@suse.com> | 2016-12-06 10:42:22 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2016-12-06 11:15:21 -0500 |
commit | cf73923358c47238088cbdd0bffdf1b7a4b7d0e7 (patch) | |
tree | 0f22619188d65ff1532b6e16d8d2eeaac50d83b3 | |
parent | 37c07fa0b74a29dea18d359068e9189c5159c49d (diff) | |
download | nfs-utils-cf73923358c47238088cbdd0bffdf1b7a4b7d0e7.tar.gz |
mount: don't hide temporary error code on timeout.
If a mount attempt times out due to repeated non-permanent errors, we
always report ETIMEDOUT rather than the actual error.
Errors like "ECONNREFUSED" or "EHOSTUNREACH" or "ESTALE" might be more
useful than the generic "ETIMEDOUT".
So preserve the error code.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r-- | utils/mount/stropts.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c index d5dfb5e..7b1ad93 100644 --- a/utils/mount/stropts.c +++ b/utils/mount/stropts.c @@ -990,10 +990,8 @@ static int nfsmount_fg(struct nfsmount_info *mi) if (nfs_is_permanent_error(errno)) break; - if (time(NULL) > timeout) { - errno = ETIMEDOUT; + if (time(NULL) > timeout) break; - } if (errno != ETIMEDOUT) { if (sleep(secs)) |