diff options
author | NeilBrown <neilb@suse.de> | 2007-03-26 21:32:14 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-27 09:05:14 -0700 |
commit | 041ae52e265fc432ea5525b1c66720385c2d11f0 (patch) | |
tree | b7bab39615cb591c7df82d70e3f5ad5dba200e3d /drivers/md/raid5.c | |
parent | 3d37890baa4ca962f8a6b77525b8f3d0698eee09 (diff) | |
download | blackbird-op-linux-041ae52e265fc432ea5525b1c66720385c2d11f0.tar.gz blackbird-op-linux-041ae52e265fc432ea5525b1c66720385c2d11f0.zip |
[PATCH] md: clear the congested_fn when stopping a raid5
If this mddev and queue got reused for another array that doesn't register a
congested_fn, this function would get called incorretly.
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/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index ae30e87bf505..4dd252864f52 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -3646,8 +3646,8 @@ static int run(mddev_t *mddev) mddev->queue->unplug_fn = raid5_unplug_device; mddev->queue->issue_flush_fn = raid5_issue_flush; - mddev->queue->backing_dev_info.congested_fn = raid5_congested; mddev->queue->backing_dev_info.congested_data = mddev; + mddev->queue->backing_dev_info.congested_fn = raid5_congested; mddev->array_size = mddev->size * (conf->previous_raid_disks - conf->max_degraded); @@ -3678,6 +3678,7 @@ static int stop(mddev_t *mddev) mddev->thread = NULL; shrink_stripes(conf); kfree(conf->stripe_hashtbl); + mddev->queue->backing_dev_info.congested_fn = NULL; blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/ sysfs_remove_group(&mddev->kobj, &raid5_attrs_group); kfree(conf->disks); |