Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14232
b: refs/heads/master
c: 93588e2
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Nov 15, 2005
1 parent bc7cb6a commit 19b43f1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e8a0033451f7972169b2f375be34d9d805ad8687
refs/heads/master: 93588e2284b6be1873cc0bb7fbf0947bdbf72830
17 changes: 13 additions & 4 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -3437,10 +3437,19 @@ static int md_thread(void * arg)
allow_signal(SIGKILL);
while (!kthread_should_stop()) {

wait_event_timeout(thread->wqueue,
test_bit(THREAD_WAKEUP, &thread->flags)
|| kthread_should_stop(),
thread->timeout);
/* We need to wait INTERRUPTIBLE so that
* we don't add to the load-average.
* That means we need to be sure no signals are
* pending
*/
if (signal_pending(current))
flush_signals(current);

wait_event_interruptible_timeout
(thread->wqueue,
test_bit(THREAD_WAKEUP, &thread->flags)
|| kthread_should_stop(),
thread->timeout);
try_to_freeze();

clear_bit(THREAD_WAKEUP, &thread->flags);
Expand Down

0 comments on commit 19b43f1

Please sign in to comment.