The patch titled ext4: warn if direct reclaim tries to writeback pages has been added to the -mm tree. Its filename is ext4-warn-if-direct-reclaim-tries-to-writeback-pages.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: ext4: warn if direct reclaim tries to writeback pages From: Mel Gorman <mgorman@xxxxxxx> Direct reclaim should never writeback pages. Warn if an attempt is made. Signed-off-by: Mel Gorman <mgorman@xxxxxxx> Cc: Dave Chinner <david@xxxxxxxxxxxxx> Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx> Cc: Johannes Weiner <jweiner@xxxxxxxxxx> Cc: Wu Fengguang <fengguang.wu@xxxxxxxxx> Cc: Jan Kara <jack@xxxxxxx> Cc: Minchan Kim <minchan.kim@xxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxx> Cc: Alex Elder <aelder@xxxxxxx> Cc: Theodore Ts'o <tytso@xxxxxxx> Cc: Chris Mason <chris.mason@xxxxxxxxxx> Cc: Dave Hansen <dave@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <> --- fs/ext4/inode.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff -puN fs/ext4/inode.c~ext4-warn-if-direct-reclaim-tries-to-writeback-pages fs/ext4/inode.c --- a/fs/ext4/inode.c~ext4-warn-if-direct-reclaim-tries-to-writeback-pages +++ a/fs/ext4/inode.c @@ -1809,8 +1809,12 @@ static int ext4_writepage(struct page *p * 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)) == + PF_MEMALLOC); goto redirty_page; } if (commit_write) _ Patches currently in -mm which might be from mgorman@xxxxxxx are mm-compaction-trivial-clean-up-in-acct_isolated.patch mm-change-isolate-mode-from-define-to-bitwise-type.patch mm-compaction-make-isolate_lru_page-filter-aware.patch mm-zone_reclaim-make-isolate_lru_page-filter-aware.patch mm-migration-clean-up-unmap_and_move.patch mm-page-writebackc-make-determine_dirtyable_memory-static-again.patch mm-vmscan-do-not-writeback-filesystem-pages-in-direct-reclaim.patch mm-vmscan-remove-dead-code-related-to-lumpy-reclaim-waiting-on-pages-under-writeback.patch xfs-warn-if-direct-reclaim-tries-to-writeback-pages.patch ext4-warn-if-direct-reclaim-tries-to-writeback-pages.patch mm-vmscan-do-not-writeback-filesystem-pages-in-kswapd-except-in-high-priority.patch mm-vmscan-throttle-reclaim-if-encountering-too-many-dirty-pages-under-writeback.patch mm-vmscan-immediately-reclaim-end-of-lru-dirty-pages-when-writeback-completes.patch hugepages-fix-race-between-hugetlbfs-umount-and-quota-update-checkpatch-fixes.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html