From: James Simmons <jsimmons@infradead.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org,
Andreas Dilger <andreas.dilger@intel.com>,
Oleg Drokin <oleg.drokin@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Lustre Development List <lustre-devel@lists.lustre.org>,
James Simmons <jsimmons@infradead.org>
Subject: [PATCH 3/6] staging: lustre: handle error returned from wait_event_timeout seltest timer
Date: Sat, 12 Mar 2016 13:00:33 -0500 [thread overview]
Message-ID: <1457805636-23859-4-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1457805636-23859-1-git-send-email-jsimmons@infradead.org>
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>
---
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
--
1.7.1
next prev parent reply other threads:[~2016-03-12 18:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-12 18:00 [PATCH 0/6] Last batch of lnet selftest cleanup James Simmons
2016-03-12 18:00 ` [PATCH 1/6] staging: lustre: Correct missing newline for CERROR call in sfw_handle_server_rpc James Simmons
2016-03-12 18:23 ` Joe Perches
2016-03-12 18:32 ` Drokin, Oleg
2016-03-12 18:56 ` Joe Perches
2016-03-12 19:17 ` Drokin, Oleg
2016-03-12 19:29 ` Joe Perches
2016-03-12 18:00 ` [PATCH 2/6] staging: lustre: add missing buffer overflow fix for console.c James Simmons
2016-03-12 18:00 ` James Simmons [this message]
2016-03-12 18:00 ` [PATCH 4/6] staging: lustre: remove excess blank lines in lnet selftest code James Simmons
2016-03-12 18:00 ` [PATCH 5/6] staging: lustre: realign some code in lnet selftest so its readable James Simmons
2016-03-12 18:00 ` [PATCH 6/6] staging: lustre: cleanup comment style for lnet selftest James Simmons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457805636-23859-4-git-send-email-jsimmons@infradead.org \
--to=jsimmons@infradead.org \
--cc=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
--cc=oleg.drokin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®