aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2005-10-28 18:50:51 -0400
committerRoland Dreier <rolandd@cisco.com>2005-10-28 18:50:51 -0400
commita4da0628efd788eb199dd9df225e296035ec2539 (patch)
tree1e611030c993e1480dc2f07f26976d2d33002b0d /drivers/md
parent70a30e16a8a9d22396a4d1e96af86e43594df584 (diff)
parent20731945ae743034353a88c307920d1f16cf8ac8 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/bitmap.c2
-rw-r--r--drivers/md/dm-crypt.c2
-rw-r--r--drivers/md/md.c10
3 files changed, 8 insertions, 6 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 2fba2bbe72d8..01654fcabc52 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -91,7 +91,7 @@ int bitmap_active(struct bitmap *bitmap)
91 91
92#define WRITE_POOL_SIZE 256 92#define WRITE_POOL_SIZE 256
93/* mempool for queueing pending writes on the bitmap file */ 93/* mempool for queueing pending writes on the bitmap file */
94static void *write_pool_alloc(unsigned int gfp_flags, void *data) 94static void *write_pool_alloc(gfp_t gfp_flags, void *data)
95{ 95{
96 return kmalloc(sizeof(struct page_list), gfp_flags); 96 return kmalloc(sizeof(struct page_list), gfp_flags);
97} 97}
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index b6148f6f7836..28c1a628621f 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -331,7 +331,7 @@ crypt_alloc_buffer(struct crypt_config *cc, unsigned int size,
331{ 331{
332 struct bio *bio; 332 struct bio *bio;
333 unsigned int nr_iovecs = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; 333 unsigned int nr_iovecs = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
334 int gfp_mask = GFP_NOIO | __GFP_HIGHMEM; 334 gfp_t gfp_mask = GFP_NOIO | __GFP_HIGHMEM;
335 unsigned int i; 335 unsigned int i;
336 336
337 /* 337 /*
diff --git a/drivers/md/md.c b/drivers/md/md.c
index e9476075aa13..2a8a5696bf8a 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3568,7 +3568,8 @@ static void md_do_sync(mddev_t *mddev)
3568 mddev->curr_resync = 2; 3568 mddev->curr_resync = 2;
3569 3569
3570 try_again: 3570 try_again:
3571 if (signal_pending(current)) { 3571 if (signal_pending(current) ||
3572 kthread_should_stop()) {
3572 flush_signals(current); 3573 flush_signals(current);
3573 set_bit(MD_RECOVERY_INTR, &mddev->recovery); 3574 set_bit(MD_RECOVERY_INTR, &mddev->recovery);
3574 goto skip; 3575 goto skip;
@@ -3590,8 +3591,9 @@ static void md_do_sync(mddev_t *mddev)
3590 */ 3591 */
3591 continue; 3592 continue;
3592 prepare_to_wait(&resync_wait, &wq, TASK_INTERRUPTIBLE); 3593 prepare_to_wait(&resync_wait, &wq, TASK_INTERRUPTIBLE);
3593 if (!signal_pending(current) 3594 if (!signal_pending(current) &&
3594 && mddev2->curr_resync >= mddev->curr_resync) { 3595 !kthread_should_stop() &&
3596 mddev2->curr_resync >= mddev->curr_resync) {
3595 printk(KERN_INFO "md: delaying resync of %s" 3597 printk(KERN_INFO "md: delaying resync of %s"
3596 " until %s has finished resync (they" 3598 " until %s has finished resync (they"
3597 " share one or more physical units)\n", 3599 " share one or more physical units)\n",
@@ -3697,7 +3699,7 @@ static void md_do_sync(mddev_t *mddev)
3697 } 3699 }
3698 3700
3699 3701
3700 if (signal_pending(current)) { 3702 if (signal_pending(current) || kthread_should_stop()) {
3701 /* 3703 /*
3702 * got a signal, exit. 3704 * got a signal, exit.
3703 */ 3705 */