mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 11:11:22 -04:00
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: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ea25f451a0
commit
3eaf9fcc4b
@@ -170,20 +170,22 @@ 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,
|
||||
stt_data.stt_shuttingdown,
|
||||
cfs_time_seconds(STTIMER_SLOTTIME));
|
||||
rc = wait_event_timeout(stt_data.stt_waitq,
|
||||
stt_data.stt_shuttingdown,
|
||||
cfs_time_seconds(STTIMER_SLOTTIME));
|
||||
}
|
||||
|
||||
spin_lock(&stt_data.stt_lock);
|
||||
stt_data.stt_nthreads--;
|
||||
spin_unlock(&stt_data.stt_lock);
|
||||
return 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user