diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c index 5efb876a588d3e441d9d2302be94e7ce0e3fe23d..c3b3124e033b9ea81881c243292ba21d55734726 100644 --- a/drivers/md/raid5-cache.c +++ b/drivers/md/raid5-cache.c @@ -2542,14 +2542,12 @@ static int r5l_load_log(struct r5l_log *log) if (log->max_free_space > RECLAIM_MAX_FREE_SPACE) log->max_free_space = RECLAIM_MAX_FREE_SPACE; log->last_checkpoint = cp; - log->next_checkpoint = cp; - mutex_lock(&log->io_mutex); - r5c_update_log_state(log); - mutex_unlock(&log->io_mutex); __free_page(page); - return r5l_recovery_log(log); + ret = r5l_recovery_log(log); + r5c_update_log_state(log); + return ret; ioerr: __free_page(page); return ret;