aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2007-07-17 07:06:13 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-17 13:23:15 -0400
commit4ad1366376bfef32ec0ffa12d1faa483d6f330bd (patch)
tree87a9c864ec5ebd446f6c99f3298bc7638efa8f1e /drivers/md/raid1.c
parentf0d76d70bc77b9b11256a3a23e98e80878be1578 (diff)
md: change bitmap_unplug and others to void functions
bitmap_unplug only ever returns 0, so it may as well be void. Two callers try to print a message if it returns non-zero, but that message is already printed by bitmap_file_kick. write_page returns an error which is not consistently checked. It always causes BITMAP_WRITE_ERROR to be set on an error, and that can more conveniently be checked. When the return of write_page is checked, an error causes bitmap_file_kick to be called - so move that call into write_page - and protect against recursive calls into bitmap_file_kick. bitmap_update_sb returns an error that is never checked. So make these 'void' and be consistent about checking the bit. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r--drivers/md/raid1.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 46677d7d9980..00c78b77b13d 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1526,8 +1526,7 @@ static void raid1d(mddev_t *mddev)
1526 blk_remove_plug(mddev->queue); 1526 blk_remove_plug(mddev->queue);
1527 spin_unlock_irqrestore(&conf->device_lock, flags); 1527 spin_unlock_irqrestore(&conf->device_lock, flags);
1528 /* flush any pending bitmap writes to disk before proceeding w/ I/O */ 1528 /* flush any pending bitmap writes to disk before proceeding w/ I/O */
1529 if (bitmap_unplug(mddev->bitmap) != 0) 1529 bitmap_unplug(mddev->bitmap);
1530 printk("%s: bitmap file write failed!\n", mdname(mddev));
1531 1530
1532 while (bio) { /* submit pending writes */ 1531 while (bio) { /* submit pending writes */
1533 struct bio *next = bio->bi_next; 1532 struct bio *next = bio->bi_next;