Message ID | 148064098372.9179.7884661059252581625.stgit@noble (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c index d5dfb5e4a669..7b1ad93effc0 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))
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> --- utils/mount/stropts.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html