@@ -3034,20 +3034,17 @@ static int r5l_load_log(struct r5l_log *log)
return ret;
}
-int r5l_start(struct r5l_log *log)
+int r5l_start(struct r5conf *conf)
{
+ struct r5l_log *log = conf->log;
int ret;
if (!log)
return 0;
ret = r5l_load_log(log);
- if (ret) {
- struct mddev *mddev = log->rdev->mddev;
- struct r5conf *conf = mddev->private;
-
+ if (ret)
r5l_exit_log(conf);
- }
return ret;
}
@@ -29,7 +29,7 @@ void r5c_check_cached_full_stripe(struct r5conf *conf);
extern struct md_sysfs_entry r5c_journal_mode;
void r5c_update_on_rdev_error(struct mddev *mddev, struct md_rdev *rdev);
bool r5c_big_stripe_cached(struct r5conf *conf, sector_t sect);
-int r5l_start(struct r5l_log *log);
+int r5l_start(struct r5conf *conf);
struct dma_async_tx_descriptor *
ops_run_partial_parity(struct stripe_head *sh, struct raid5_percpu *percpu,
@@ -8040,7 +8040,7 @@ static int raid5_add_disk(struct mddev *mddev, struct md_rdev *rdev)
if (ret)
return ret;
- ret = r5l_start(conf->log);
+ ret = r5l_start(conf);
if (ret)
return ret;
@@ -8743,7 +8743,7 @@ static int raid5_start(struct mddev *mddev)
{
struct r5conf *conf = mddev->private;
- return r5l_start(conf->log);
+ return r5l_start(conf);
}
static struct md_personality raid6_personality =