diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index c7284dd7d52faeac15545e8da7362b81427a4a0f..ca4f54fbbd2e9ae2b5e33b6a83f011a891b71433 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -1308,20 +1308,16 @@ struct decompress_io_ctx *f2fs_alloc_dic(struct compress_ctx *cc) goto out_free; for (i = 0; i < dic->cluster_size; i++) { - if (cc->rpages[i]) + if (cc->rpages[i]) { + dic->tpages[i] = cc->rpages[i]; continue; + } dic->tpages[i] = f2fs_grab_page(); if (!dic->tpages[i]) goto out_free; } - for (i = 0; i < dic->cluster_size; i++) { - if (dic->tpages[i]) - continue; - dic->tpages[i] = cc->rpages[i]; - } - return dic; out_free: