Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10096
b: refs/heads/master
c: 8712e55
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Oct 26, 2005
1 parent f1660ac commit 923324f
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 6693e74a16ef563960764bd963f1048392135c3c
refs/heads/master: 8712e553562bbbed9b3a99370f08e9bc25908a76
10 changes: 6 additions & 4 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -3568,7 +3568,8 @@ static void md_do_sync(mddev_t *mddev)
mddev->curr_resync = 2;

try_again:
if (signal_pending(current)) {
if (signal_pending(current) ||
kthread_should_stop()) {
flush_signals(current);
set_bit(MD_RECOVERY_INTR, &mddev->recovery);
goto skip;
Expand All @@ -3590,8 +3591,9 @@ static void md_do_sync(mddev_t *mddev)
*/
continue;
prepare_to_wait(&resync_wait, &wq, TASK_INTERRUPTIBLE);
if (!signal_pending(current)
&& mddev2->curr_resync >= mddev->curr_resync) {
if (!signal_pending(current) &&
!kthread_should_stop() &&
mddev2->curr_resync >= mddev->curr_resync) {
printk(KERN_INFO "md: delaying resync of %s"
" until %s has finished resync (they"
" share one or more physical units)\n",
Expand Down Expand Up @@ -3697,7 +3699,7 @@ static void md_do_sync(mddev_t *mddev)
}


if (signal_pending(current)) {
if (signal_pending(current) || kthread_should_stop()) {
/*
* got a signal, exit.
*/
Expand Down

0 comments on commit 923324f

Please sign in to comment.