diff --git a/mm/swap_state.c b/mm/swap_state.c index 2475ba29126d..ebef568cd62e 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c @@ -906,8 +906,8 @@ struct folio *swap_cluster_readahead(swp_entry_t entry, gfp_t gfp_mask, continue; folio_put(folio); } - blk_finish_plug(&plug); swap_read_submit(&ctx); + blk_finish_plug(&plug); skip: return swap_cache_read_folio_sync(entry, gfp_mask, mpol, ilx); } @@ -1019,8 +1019,8 @@ static struct folio *swap_vma_readahead(swp_entry_t targ_entry, gfp_t gfp_mask, } if (pte) pte_unmap(pte); - blk_finish_plug(&plug); swap_read_submit(&ctx); + blk_finish_plug(&plug); skip: /* The folio was likely read above, so no need for plugging here */ return swap_cache_read_folio_sync(targ_entry, gfp_mask, mpol, targ_ilx);