diff options
author | James Simmons <jsimmons@infradead.org> | 2016-03-12 18:00:33 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-28 14:30:36 (GMT) |
commit | 3eaf9fcc4b97dc3a475d2328c29cfd46615b3e55 (patch) | |
tree | 465273b7175e9da4dac88077ec80fc994fbb8867 /drivers/staging/lustre/lnet/selftest | |
parent | ea25f451a063e1934402fab578d85ea8254d3dee (diff) | |
download | linux-3eaf9fcc4b97dc3a475d2328c29cfd46615b3e55.tar.xz |
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>
Diffstat (limited to 'drivers/staging/lustre/lnet/selftest')
-rw-r--r-- | drivers/staging/lustre/lnet/selftest/timer.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lnet/selftest/timer.c b/drivers/staging/lustre/lnet/selftest/timer.c index 8be5252..ef8a8a7 100644 --- a/drivers/staging/lustre/lnet/selftest/timer.c +++ b/drivers/staging/lustre/lnet/selftest/timer.c @@ -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 |