Commit 966dbde2 authored by Mel Gorman's avatar Mel Gorman Committed by Linus Torvalds

ext4: warn if direct reclaim tries to writeback pages

Direct reclaim should never writeback pages.  Warn if an attempt is made.
Signed-off-by: default avatarMel Gorman <>
Cc: Dave Chinner <>
Cc: Christoph Hellwig <>
Cc: Johannes Weiner <>
Cc: Wu Fengguang <>
Cc: Jan Kara <>
Cc: Minchan Kim <>
Cc: Rik van Riel <>
Cc: Mel Gorman <>
Cc: Alex Elder <>
Cc: Theodore Ts'o <>
Cc: Chris Mason <>
Cc: Dave Hansen <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 94054fa3
......@@ -1811,8 +1811,12 @@ static int ext4_writepage(struct page *page,
* We don't want to do block allocation, so redirty
* the page and return. We may reach here when we do
* a journal commit via journal_submit_inode_data_buffers.
* We can also reach here via shrink_page_list
* We can also reach here via shrink_page_list but it
* should never be for direct reclaim so warn if that
* happens
WARN_ON_ONCE((current->flags & (PF_MEMALLOC|PF_KSWAPD)) ==
goto redirty_page;
if (commit_write)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment