On Wed, 28 Aug 2024 20:36:03 +0800 Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> wrote: > > I wonder if this is stable. Before page_folio(), it does not hold a > > reference on the page, so seems we should re-check the folio still > > contains this page after gaining a reference on the folio? > > Oh, you are right, so two way to avoid this, > > 1) re-check 'page_folio(page) == folio', but this need change a little > more. > > 2) directly use folio_get_nontail_page(page) here, and folio_put in the > following path, this will try to get for any pages, but it should be > accepted ? > > I'd prefer 2) but any other suggestion? I dropped the v1 series.