+ /* If the user did not unmount the tape and we are polling, ensure
+ * that we poll at the correct interval.
+ */
+ if (!unmounted && dev->vol_poll_interval &&
+ add_wait > dev->vol_poll_interval - total_waited) {
+ add_wait = dev->vol_poll_interval - total_waited;
+ }
+ if (add_wait < 0) {
+ add_wait = 0;
+ }