Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3eaf9fcc authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman
Browse files

staging: lustre: handle error returned from wait_event_timeout seltest timer



The function wait_event_timeout can fail and return an error. Handle
this case in stt_timer_main().

Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ea25f451
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -170,12 +170,14 @@ stt_check_timers(unsigned long *last)
static int
stt_timer_main(void *arg)
{
	int rc = 0;

	cfs_block_allsigs();

	while (!stt_data.stt_shuttingdown) {
		stt_check_timers(&stt_data.stt_prev_slot);

		wait_event_timeout(stt_data.stt_waitq,
		rc = wait_event_timeout(stt_data.stt_waitq,
					stt_data.stt_shuttingdown,
					cfs_time_seconds(STTIMER_SLOTTIME));
	}
@@ -183,7 +185,7 @@ stt_timer_main(void *arg)
	spin_lock(&stt_data.stt_lock);
	stt_data.stt_nthreads--;
	spin_unlock(&stt_data.stt_lock);
	return 0;
	return rc;
}

static int