diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/raid1.c | 5 | ||||
-rw-r--r-- | drivers/md/raid5.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 7b75a1942159..308e8c8905c9 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -875,13 +875,16 @@ static void make_request(struct mddev *mddev, struct bio * bio) */ DEFINE_WAIT(w); for (;;) { - flush_signals(current); + sigset_t full, old; prepare_to_wait(&conf->wait_barrier, &w, TASK_INTERRUPTIBLE); if (bio->bi_sector + bio->bi_size/512 <= mddev->suspend_lo || bio->bi_sector >= mddev->suspend_hi) break; + sigfillset(&full); + sigprocmask(SIG_BLOCK, &full, &old); schedule(); + sigprocmask(SIG_SETMASK, &old, NULL); } finish_wait(&conf->wait_barrier, &w); } diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 6056ee7984ac..2682eb95c41e 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -3823,12 +3823,16 @@ static void make_request(struct mddev *mddev, struct bio * bi) * userspace, we want an interruptible * wait. */ - flush_signals(current); prepare_to_wait(&conf->wait_for_overlap, &w, TASK_INTERRUPTIBLE); if (logical_sector >= mddev->suspend_lo && - logical_sector < mddev->suspend_hi) + logical_sector < mddev->suspend_hi) { + sigset_t full, old; + sigfillset(&full); + sigprocmask(SIG_BLOCK, &full, &old); schedule(); + sigprocmask(SIG_SETMASK, &old, NULL); + } goto retry; } |