aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-07-26 21:00:36 -0400
committerNeilBrown <neilb@suse.de>2011-07-26 21:00:36 -0400
commit86c374ba9f6726a79a032ede741dc66d219b166e (patch)
tree58bf8de967c300828e3176459455a86d68e27971 /drivers/md/raid5.c
parentcc94015a9eac5d511fe9b716624d8fdf9c6e64b2 (diff)
md/raid5: Remove stripe_head_state arg from handle_stripe_expansion.
This arg is only used to differentiate between RAID5 and RAID6 but that is not needed. For RAID5, raid5_compute_sector will set qd_idx to "~0" so j with certainly not equals qd_idx, so there is no need for a guard on that condition. So remove the guard and remove the arg from the declaration and callers of handle_stripe_expansion. Signed-off-by: NeilBrown <neilb@suse.de> Reviewed-by: Namhyung Kim <namhyung@gmail.com>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 36873cfc3291..793dd76aeae0 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -2921,8 +2921,7 @@ static void handle_parity_checks6(raid5_conf_t *conf, struct stripe_head *sh,
2921 } 2921 }
2922} 2922}
2923 2923
2924static void handle_stripe_expansion(raid5_conf_t *conf, struct stripe_head *sh, 2924static void handle_stripe_expansion(raid5_conf_t *conf, struct stripe_head *sh)
2925 struct stripe_head_state *r6s)
2926{ 2925{
2927 int i; 2926 int i;
2928 2927
@@ -2964,7 +2963,7 @@ static void handle_stripe_expansion(raid5_conf_t *conf, struct stripe_head *sh,
2964 set_bit(R5_UPTODATE, &sh2->dev[dd_idx].flags); 2963 set_bit(R5_UPTODATE, &sh2->dev[dd_idx].flags);
2965 for (j = 0; j < conf->raid_disks; j++) 2964 for (j = 0; j < conf->raid_disks; j++)
2966 if (j != sh2->pd_idx && 2965 if (j != sh2->pd_idx &&
2967 (!r6s || j != sh2->qd_idx) && 2966 j != sh2->qd_idx &&
2968 !test_bit(R5_Expanded, &sh2->dev[j].flags)) 2967 !test_bit(R5_Expanded, &sh2->dev[j].flags))
2969 break; 2968 break;
2970 if (j == conf->raid_disks) { 2969 if (j == conf->raid_disks) {
@@ -3249,7 +3248,7 @@ static void handle_stripe5(struct stripe_head *sh, struct stripe_head_state *s)
3249 3248
3250 if (s->expanding && s->locked == 0 && 3249 if (s->expanding && s->locked == 0 &&
3251 !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) 3250 !test_bit(STRIPE_COMPUTE_RUN, &sh->state))
3252 handle_stripe_expansion(conf, sh, NULL); 3251 handle_stripe_expansion(conf, sh);
3253} 3252}
3254 3253
3255static void handle_stripe6(struct stripe_head *sh, struct stripe_head_state *s) 3254static void handle_stripe6(struct stripe_head *sh, struct stripe_head_state *s)
@@ -3512,7 +3511,7 @@ static void handle_stripe6(struct stripe_head *sh, struct stripe_head_state *s)
3512 3511
3513 if (s->expanding && s->locked == 0 && 3512 if (s->expanding && s->locked == 0 &&
3514 !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) 3513 !test_bit(STRIPE_COMPUTE_RUN, &sh->state))
3515 handle_stripe_expansion(conf, sh, s); 3514 handle_stripe_expansion(conf, sh);
3516} 3515}
3517 3516
3518static void handle_stripe(struct stripe_head *sh) 3517static void handle_stripe(struct stripe_head *sh)