Author: trasz Date: Sat Mar 7 20:00:26 2015 New Revision: 279749 URL: https://svnweb.freebsd.org/changeset/base/279749
Log: MFC r271927: Turns out -1 is a perfectly valid error number, ERESTART. Remove useless code written under assumption that it wasn't. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/autofs/autofs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/autofs/autofs.c ============================================================================== --- stable/10/sys/fs/autofs/autofs.c Sat Mar 7 19:52:14 2015 (r279748) +++ stable/10/sys/fs/autofs/autofs.c Sat Mar 7 20:00:26 2015 (r279749) @@ -450,11 +450,6 @@ autofs_trigger_one(struct autofs_node *a &autofs_softc->sc_lock); autofs_restore_sigmask(&oldset); if (error != 0) { - /* - * XXX: For some reson this returns -1 - * instead of EINTR, wtf?! - */ - error = EINTR; AUTOFS_WARN("cv_wait_sig for %s failed " "with error %d", ar->ar_path, error); break; @@ -520,7 +515,7 @@ autofs_trigger(struct autofs_node *anp, anp->an_retries = 0; return (0); } - if (error == EINTR) { + if (error == EINTR || error == ERESTART) { AUTOFS_DEBUG("trigger interrupted by signal, " "not retrying"); anp->an_retries = 0; @@ -566,11 +561,6 @@ autofs_ioctl_request(struct autofs_daemo error = cv_wait_sig(&autofs_softc->sc_cv, &autofs_softc->sc_lock); if (error != 0) { - /* - * XXX: For some reson this returns -1 instead - * of EINTR, wtf?! - */ - error = EINTR; sx_xunlock(&autofs_softc->sc_lock); AUTOFS_DEBUG("failed with error %d", error); return (error); _______________________________________________ svn-src-stable-10@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"