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 @@ -3220,7 +3220,6 @@ static int raid1_set_limits(struct mddev *mddev)
3220
3220
return queue_limits_set (mddev -> gendisk -> queue , & lim );
3221
3221
}
3222
3222
3223
- static void raid1_free (struct mddev * mddev , void * priv );
3224
3223
static int raid1_run (struct mddev * mddev )
3225
3224
{
3226
3225
struct r1conf * conf ;
@@ -3254,7 +3253,7 @@ static int raid1_run(struct mddev *mddev)
3254
3253
if (!mddev_is_dm (mddev )) {
3255
3254
ret = raid1_set_limits (mddev );
3256
3255
if (ret )
3257
- goto abort ;
3256
+ return ret ;
3258
3257
}
3259
3258
3260
3259
mddev -> degraded = 0 ;
@@ -3268,8 +3267,7 @@ static int raid1_run(struct mddev *mddev)
3268
3267
*/
3269
3268
if (conf -> raid_disks - mddev -> degraded < 1 ) {
3270
3269
md_unregister_thread (mddev , & conf -> thread );
3271
- ret = - EINVAL ;
3272
- goto abort ;
3270
+ return - EINVAL ;
3273
3271
}
3274
3272
3275
3273
if (conf -> raid_disks - mddev -> degraded == 1 )
@@ -3293,14 +3291,8 @@ static int raid1_run(struct mddev *mddev)
3293
3291
md_set_array_sectors (mddev , raid1_size (mddev , 0 , 0 ));
3294
3292
3295
3293
ret = md_integrity_register (mddev );
3296
- if (ret ) {
3294
+ if (ret )
3297
3295
md_unregister_thread (mddev , & mddev -> thread );
3298
- goto abort ;
3299
- }
3300
- return 0 ;
3301
-
3302
- abort :
3303
- raid1_free (mddev , conf );
3304
3296
return ret ;
3305
3297
}
3306
3298
You can’t perform that action at this time.
0 commit comments