diff options
author | NeilBrown <neilb@suse.de> | 2006-05-01 12:15:44 -0700 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2006-05-20 15:00:27 -0700 |
commit | 37f94ce7266457a8d8b463edbebacd9bcedfd183 (patch) | |
tree | 780e827fca63248b31299e3f483aaa84dfe4d14a /drivers/md | |
parent | 22ddf44d54d0b2326f7b233e836e7155d45d3a7d (diff) |
[PATCH] md: Avoid oops when attempting to fix read errors on raid10
We should add to the counter for the rdev *after* checking if the rdev is
NULL!!!
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/raid10.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index ab90a6d1202..039ed49b3c0 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -1436,9 +1436,9 @@ static void raid10d(mddev_t *mddev) sl--; d = r10_bio->devs[sl].devnum; rdev = conf->mirrors[d].rdev; - atomic_add(s, &rdev->corrected_errors); if (rdev && test_bit(In_sync, &rdev->flags)) { + atomic_add(s, &rdev->corrected_errors); if (sync_page_io(rdev->bdev, r10_bio->devs[sl].addr + sect + rdev->data_offset, |