On Fri, 6 Jun 2025 09:11:37 +0800 Kemeng Shi <shikemeng@xxxxxxxxxxxxxxx> wrote: > >> --- a/mm/shmem.c > >> +++ b/mm/shmem.c > >> @@ -2145,7 +2145,7 @@ static void shmem_set_folio_swapin_error(struct inode *inode, pgoff_t index, > >> * won't be 0 when inode is released and thus trigger WARN_ON(i_blocks) > >> * in shmem_evict_inode(). > >> */ > >> - shmem_recalc_inode(inode, -nr_pages, -nr_pages); > >> + shmem_recalc_inode(inode, 0, -nr_pages); > >> swap_free_nr(swap, nr_pages); > >> } > > > > Huh, three years ago. What do we think might be the userspace-visible > > runtime effects of this? > This could trigger WARN_ON(i_blocks) in shmem_evict_inode() as i_blocks > is supposed to be dropped in the quota free routine. I don't believe we've seen such a report in those three years so perhaps no need to backport. But it's a one-liner so let's backport ;) And possibly [2/7] and [3/7] should receive the same treatment. I don't think any of these need to be fast-tracked into mm-hotfixes so please resend after a suitable review period and include the cc:stable on those which -stable needs.