> On Jun 19, 2019, at 8:10 PM, Song Liu <songliubraving@xxxxxx> wrote: > > This is not truncate the file. It only drops page cache. > truncate_setsize() will still set correct size. I don't > think this breaks anything. > > We can probably make it smarter and only drop the clean > huge pages (dirty page should not exist). It sounds like I will need this change for my THP work as well for the same reason; once a RO THP text page is in the page cache, if the file is marked writable strange things will occur.