Message ID | 20240111143747.4418-3-r.smirnov@omp.ru (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mm/truncate: fix issue in ext4_set_page_dirty() | expand |
diff --git a/mm/truncate.c b/mm/truncate.c index 03998fd86e4a..72d6c62756fd 100644 --- a/mm/truncate.c +++ b/mm/truncate.c @@ -232,7 +232,8 @@ int invalidate_inode_page(struct page *page) return 0; if (PageDirty(page) || PageWriteback(page)) return 0; - if (page_mapped(page)) + if (page_ref_count(page) > + compound_nr(page) + page_has_private(page) + 1) return 0; if (page_has_private(page) && !try_to_release_page(page, 0)) return 0;