File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -3204,7 +3204,6 @@ static int raid1_set_limits(struct mddev *mddev)
3204
3204
return queue_limits_set (mddev -> gendisk -> queue , & lim );
3205
3205
}
3206
3206
3207
- static void raid1_free (struct mddev * mddev , void * priv );
3208
3207
static int raid1_run (struct mddev * mddev )
3209
3208
{
3210
3209
struct r1conf * conf ;
@@ -3238,7 +3237,7 @@ static int raid1_run(struct mddev *mddev)
3238
3237
if (!mddev_is_dm (mddev )) {
3239
3238
ret = raid1_set_limits (mddev );
3240
3239
if (ret )
3241
- goto abort ;
3240
+ return ret ;
3242
3241
}
3243
3242
3244
3243
mddev -> degraded = 0 ;
@@ -3252,8 +3251,7 @@ static int raid1_run(struct mddev *mddev)
3252
3251
*/
3253
3252
if (conf -> raid_disks - mddev -> degraded < 1 ) {
3254
3253
md_unregister_thread (mddev , & conf -> thread );
3255
- ret = - EINVAL ;
3256
- goto abort ;
3254
+ return - EINVAL ;
3257
3255
}
3258
3256
3259
3257
if (conf -> raid_disks - mddev -> degraded == 1 )
@@ -3277,14 +3275,8 @@ static int raid1_run(struct mddev *mddev)
3277
3275
md_set_array_sectors (mddev , raid1_size (mddev , 0 , 0 ));
3278
3276
3279
3277
ret = md_integrity_register (mddev );
3280
- if (ret ) {
3278
+ if (ret )
3281
3279
md_unregister_thread (mddev , & mddev -> thread );
3282
- goto abort ;
3283
- }
3284
- return 0 ;
3285
-
3286
- abort :
3287
- raid1_free (mddev , conf );
3288
3280
return ret ;
3289
3281
}
3290
3282
You can’t perform that action at this time.
0 commit comments