aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid10.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2016-06-02 02:19:52 -0400
committerShaohua Li <shli@fb.com>2016-06-13 14:54:16 -0400
commit4056ca51a2ed2eb22fd2fa9b0400b1dcaf78a6b5 (patch)
tree5d4608a775955d345e5888eb5d09ee66fa361879 /drivers/md/raid10.c
parentd683c8e0f728f4b4e85f21d5fa7e452f3d3f5fb1 (diff)
md/raid10: simplify print_conf a little.
'tmp' is only ever used to extract 'tmp->rdev', so just use 'rdev' directly. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r--drivers/md/raid10.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 7a8bfe2196c9..526c1d82246e 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1598,7 +1598,7 @@ static void raid10_error(struct mddev *mddev, struct md_rdev *rdev)
1598static void print_conf(struct r10conf *conf) 1598static void print_conf(struct r10conf *conf)
1599{ 1599{
1600 int i; 1600 int i;
1601 struct raid10_info *tmp; 1601 struct md_rdev *rdev;
1602 1602
1603 printk(KERN_DEBUG "RAID10 conf printout:\n"); 1603 printk(KERN_DEBUG "RAID10 conf printout:\n");
1604 if (!conf) { 1604 if (!conf) {
@@ -1608,14 +1608,16 @@ static void print_conf(struct r10conf *conf)
1608 printk(KERN_DEBUG " --- wd:%d rd:%d\n", conf->geo.raid_disks - conf->mddev->degraded, 1608 printk(KERN_DEBUG " --- wd:%d rd:%d\n", conf->geo.raid_disks - conf->mddev->degraded,
1609 conf->geo.raid_disks); 1609 conf->geo.raid_disks);
1610 1610
1611 /* This is only called with ->reconfix_mutex held, so
1612 * rcu protection of rdev is not needed */
1611 for (i = 0; i < conf->geo.raid_disks; i++) { 1613 for (i = 0; i < conf->geo.raid_disks; i++) {
1612 char b[BDEVNAME_SIZE]; 1614 char b[BDEVNAME_SIZE];
1613 tmp = conf->mirrors + i; 1615 rdev = conf->mirrors[i].rdev;
1614 if (tmp->rdev) 1616 if (rdev)
1615 printk(KERN_DEBUG " disk %d, wo:%d, o:%d, dev:%s\n", 1617 printk(KERN_DEBUG " disk %d, wo:%d, o:%d, dev:%s\n",
1616 i, !test_bit(In_sync, &tmp->rdev->flags), 1618 i, !test_bit(In_sync, &rdev->flags),
1617 !test_bit(Faulty, &tmp->rdev->flags), 1619 !test_bit(Faulty, &rdev->flags),
1618 bdevname(tmp->rdev->bdev,b)); 1620 bdevname(rdev->bdev,b));
1619 } 1621 }
1620} 1622}
1621 1623