From: Heinz Mauelshagen <heinzm@xxxxxxxxxx> Signed-off-by: heinzm <heinzm@xxxxxxxxxx> --- drivers/md/md-bitmap.c | 3 +-- drivers/md/md.c | 30 ++++++++++++------------------ 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c index 2db748c998e1..fcf516d7fcff 100644 --- a/drivers/md/md-bitmap.c +++ b/drivers/md/md-bitmap.c @@ -469,8 +469,7 @@ void md_bitmap_update_sb(struct bitmap *bitmap) sb->sync_size = cpu_to_le64(bitmap->mddev->resync_max_sectors); sb->chunksize = cpu_to_le32(bitmap->mddev->bitmap_info.chunksize); sb->nodes = cpu_to_le32(bitmap->mddev->bitmap_info.nodes); - sb->sectors_reserved = cpu_to_le32(bitmap->mddev-> - bitmap_info.space); + sb->sectors_reserved = cpu_to_le32(bitmap->mddev->bitmap_info.space); kunmap_atomic(sb); write_page(bitmap, bitmap->storage.sb_page, 1); } diff --git a/drivers/md/md.c b/drivers/md/md.c index 2e764ddc55d6..187fe8a25fc1 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -2833,8 +2833,7 @@ static int add_bound_rdev(struct md_rdev *rdev) * then added disks for geometry changes, * and should be added immediately. */ - super_types[mddev->major_version]. - validate_super(mddev, rdev); + super_types[mddev->major_version].validate_super(mddev, rdev); if (add_journal) mddev_suspend(mddev); err = mddev->pers->hot_add_disk(mddev, rdev); @@ -3292,8 +3291,7 @@ static ssize_t new_offset_store(struct md_rdev *rdev, return -EINVAL; if (mddev->pers && mddev->persistent && - !super_types[mddev->major_version] - .allow_new_offset(rdev, new_offset)) + !super_types[mddev->major_version].allow_new_offset(rdev, new_offset)) return -E2BIG; rdev->new_data_offset = new_offset; if (new_offset > rdev->data_offset) @@ -3377,8 +3375,8 @@ rdev_size_store(struct md_rdev *rdev, const char *buf, size_t len) return -EINVAL; /* too confusing */ if (my_mddev->pers && rdev->raid_disk >= 0) { if (my_mddev->persistent) { - sectors = super_types[my_mddev->major_version]. - rdev_size_change(rdev, sectors); + sectors = super_types[my_mddev->major_version].rdev_size_change(rdev, + sectors); if (!sectors) return -EBUSY; } else if (!sectors) @@ -3701,8 +3699,7 @@ static struct md_rdev *md_import_device(dev_t newdev, int super_format, int supe } if (super_format >= 0) { - err = super_types[super_format]. - load_super(rdev, NULL, super_minor); + err = super_types[super_format].load_super(rdev, NULL, super_minor); if (err == -EINVAL) { pr_warn("md: %pg does not have a valid v%d.%d superblock, not importing!\n", rdev->bdev, @@ -3738,8 +3735,8 @@ static int analyze_sbs(struct mddev *mddev) freshest = NULL; rdev_for_each_safe(rdev, tmp, mddev) - switch (super_types[mddev->major_version]. - load_super(rdev, freshest, mddev->minor_version)) { + switch (super_types[mddev->major_version].load_super(rdev, freshest, + mddev->minor_version)) { case 1: freshest = rdev; break; @@ -3757,8 +3754,7 @@ static int analyze_sbs(struct mddev *mddev) return -EINVAL; } - super_types[mddev->major_version]. - validate_super(mddev, freshest); + super_types[mddev->major_version].validate_super(mddev, freshest); i = 0; rdev_for_each_safe(rdev, tmp, mddev) { @@ -3772,8 +3768,7 @@ static int analyze_sbs(struct mddev *mddev) continue; } if (rdev != freshest) { - if (super_types[mddev->major_version]. - validate_super(mddev, rdev)) { + if (super_types[mddev->major_version].validate_super(mddev, rdev)) { pr_warn("md: kicking non-fresh %pg from array!\n", rdev->bdev); md_kick_rdev_from_array(rdev); @@ -6793,8 +6788,7 @@ int md_add_new_disk(struct mddev *mddev, struct mdu_disk_info_s *info) rdev->raid_disk = -1; rdev->saved_raid_disk = rdev->raid_disk; } else - super_types[mddev->major_version]. - validate_super(mddev, rdev); + super_types[mddev->major_version].validate_super(mddev, rdev); if ((info->state & (1<<MD_DISK_SYNC)) && rdev->raid_disk != info->raid_disk) { /* This was a hot-add request, but events doesn't @@ -9831,8 +9825,8 @@ static int read_rdev(struct mddev *mddev, struct md_rdev *rdev) if (err == 0) { ClearPageUptodate(rdev->sb_page); rdev->sb_loaded = 0; - err = super_types[mddev->major_version]. - load_super(rdev, NULL, mddev->minor_version); + err = super_types[mddev->major_version].load_super(rdev, NULL, + mddev->minor_version); } if (err < 0) { pr_warn("%s: %d Could not reload rdev(%d) err: %d. Restoring old values\n", -- 2.39.2