diff options
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index d32fc559ff05..f05d5983efb6 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -1100,7 +1100,7 @@ static int raid1_spare_active(mddev_t *mddev) | |||
1100 | static int raid1_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) | 1100 | static int raid1_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) |
1101 | { | 1101 | { |
1102 | conf_t *conf = mddev->private; | 1102 | conf_t *conf = mddev->private; |
1103 | int found = 0; | 1103 | int err = -EEXIST; |
1104 | int mirror = 0; | 1104 | int mirror = 0; |
1105 | mirror_info_t *p; | 1105 | mirror_info_t *p; |
1106 | int first = 0; | 1106 | int first = 0; |
@@ -1124,7 +1124,7 @@ static int raid1_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) | |||
1124 | 1124 | ||
1125 | p->head_position = 0; | 1125 | p->head_position = 0; |
1126 | rdev->raid_disk = mirror; | 1126 | rdev->raid_disk = mirror; |
1127 | found = 1; | 1127 | err = 0; |
1128 | /* As all devices are equivalent, we don't need a full recovery | 1128 | /* As all devices are equivalent, we don't need a full recovery |
1129 | * if this was recently any drive of the array | 1129 | * if this was recently any drive of the array |
1130 | */ | 1130 | */ |
@@ -1135,7 +1135,7 @@ static int raid1_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) | |||
1135 | } | 1135 | } |
1136 | 1136 | ||
1137 | print_conf(conf); | 1137 | print_conf(conf); |
1138 | return found; | 1138 | return err; |
1139 | } | 1139 | } |
1140 | 1140 | ||
1141 | static int raid1_remove_disk(mddev_t *mddev, int number) | 1141 | static int raid1_remove_disk(mddev_t *mddev, int number) |