On Mon, 17 Apr 2023 15:00:25 +0800
Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx> wrote:
Although please help refine the comment below:
/* scan & fill inplace I/O pages in the reverse order */
Ok, will refine it in v2.
Thanks,
Gao Xiang
+ unsigned int icur = pcl->pclusterpages;
- while (fe->icur > 0) {
- if (!cmpxchg(&pcl->compressed_bvecs[--fe->icur].page,
+ while (icur > 0) {
+ if (!cmpxchg(&pcl->compressed_bvecs[--icur].page,
NULL, bvec->page)) {
- pcl->compressed_bvecs[fe->icur] = *bvec;
+ pcl->compressed_bvecs[icur] = *bvec;
return true;
}
}
@@ -877,8 +876,6 @@ static int z_erofs_collector_begin(struct z_erofs_decompress_frontend *fe)
}
z_erofs_bvec_iter_begin(&fe->biter, &fe->pcl->bvset,
Z_EROFS_INLINE_BVECS, fe->pcl->vcnt);
- /* since file-backed online pages are traversed in reverse order */
- fe->icur = z_erofs_pclusterpages(fe->pcl);
return 0;
}