From: Matthew Wilcox (Oracle) Date: Thu, 2 Apr 2020 04:05:00 +0000 (-0700) Subject: mm/page-writeback.c: use VM_BUG_ON_PAGE in clear_page_dirty_for_io X-Git-Tag: v5.7-rc1~124^2~120 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=184b4fef58b6ab5556c0715fb711454086433f3a;p=thirdparty%2Fkernel%2Flinux.git mm/page-writeback.c: use VM_BUG_ON_PAGE in clear_page_dirty_for_io Dumping the page information in this circumstance helps for debugging. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: Christoph Hellwig Acked-by: Kirill A. Shutemov Cc: Aneesh Kumar K.V Cc: Pankaj Gupta Link: http://lkml.kernel.org/r/20200318140253.6141-7-willy@infradead.org Signed-off-by: Linus Torvalds --- diff --git a/mm/page-writeback.c b/mm/page-writeback.c index ab5a3cee8ad34..d9c42d38ee479 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -2655,7 +2655,7 @@ int clear_page_dirty_for_io(struct page *page) struct address_space *mapping = page_mapping(page); int ret = 0; - BUG_ON(!PageLocked(page)); + VM_BUG_ON_PAGE(!PageLocked(page), page); if (mapping && mapping_cap_account_dirty(mapping)) { struct inode *inode = mapping->host;