]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
imsm: remove redundant calls to imsm_get_map
authorMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Tue, 24 Nov 2020 14:58:53 +0000 (15:58 +0100)
committerJes Sorensen <jsorensen@fb.com>
Wed, 25 Nov 2020 23:08:04 +0000 (18:08 -0500)
MAP_0 is gotten and the beginning, there is no need to get it again.

Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
super-intel.c

index 95620649dea09b3de8909e4b9b0fc63970b344e8..95f4eaf8234dec097e3ac157bec4b0839d9a45f6 100644 (file)
@@ -8598,7 +8598,6 @@ static void imsm_set_disk(struct active_array *a, int n, int state)
                                break;
                        }
                        end_migration(dev, super, map_state);
-                       map = get_imsm_map(dev, MAP_0);
                        map->failed_disk_num = ~0;
                        super->updates_pending++;
                        a->last_checkpoint = 0;
@@ -8610,7 +8609,6 @@ static void imsm_set_disk(struct active_array *a, int n, int state)
                                end_migration(dev, super, map_state);
                        else
                                map->map_state = map_state;
-                       map = get_imsm_map(dev, MAP_0);
                        map->failed_disk_num = ~0;
                        super->updates_pending++;
                        break;