All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: linux-mm@kvack.org
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	Christoph Hellwig <hch@lst.de>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>
Subject: [PATCH 4/6] mm: Use VM_BUG_ON_PAGE in clear_page_dirty_for_io
Date: Mon,  2 Mar 2020 20:11:23 -0800	[thread overview]
Message-ID: <20200303041125.19358-5-willy@infradead.org> (raw)
In-Reply-To: <20200303041125.19358-1-willy@infradead.org>

From: "Matthew Wilcox (Oracle)" <willy@infradead.org>

Dumping the page information in this circumstance helps for debugging.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 mm/page-writeback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 2caf780a42e7..9173c25cf8e6 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;
-- 
2.25.1



  parent reply	other threads:[~2020-03-03  4:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03  4:11 [PATCH 0/6] Misc MM patches Matthew Wilcox
2020-03-03  4:11 ` [PATCH 1/6] mm: Use vm_fault error code directly Matthew Wilcox
2020-03-03  4:11 ` [PATCH 2/6] mm: Optimise find_subpage for !THP Matthew Wilcox
2020-03-03 21:28   ` Alexander Duyck
2020-03-03 21:47     ` Matthew Wilcox
2020-03-05  9:54       ` William Kucharski
2020-03-03  4:11 ` [PATCH 3/6] mm: Remove CONFIG_TRANSPARENT_HUGE_PAGECACHE Matthew Wilcox
2020-03-03 21:52   ` Alexander Duyck
2020-03-03 22:34     ` Matthew Wilcox
2020-03-03 22:54       ` Alexander Duyck
2020-03-04  2:06         ` Matthew Wilcox
2020-03-03  4:11 ` Matthew Wilcox [this message]
2020-03-03  4:11 ` [PATCH 5/6] mm: Unexport find_get_entry Matthew Wilcox
2020-03-03  4:11 ` [PATCH 6/6] mm: Rewrite pagecache_get_page documentation Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200303041125.19358-5-willy@infradead.org \
    --to=willy@infradead.org \
    --cc=hch@lst.de \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.