diff options
-rw-r--r-- | fs/ext4/inode.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 986e2388f031..0defe0bfe019 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -1811,8 +1811,12 @@ static int ext4_writepage(struct page *page, | |||
1811 | * We don't want to do block allocation, so redirty | 1811 | * We don't want to do block allocation, so redirty |
1812 | * the page and return. We may reach here when we do | 1812 | * the page and return. We may reach here when we do |
1813 | * a journal commit via journal_submit_inode_data_buffers. | 1813 | * a journal commit via journal_submit_inode_data_buffers. |
1814 | * We can also reach here via shrink_page_list | 1814 | * We can also reach here via shrink_page_list but it |
1815 | * should never be for direct reclaim so warn if that | ||
1816 | * happens | ||
1815 | */ | 1817 | */ |
1818 | WARN_ON_ONCE((current->flags & (PF_MEMALLOC|PF_KSWAPD)) == | ||
1819 | PF_MEMALLOC); | ||
1816 | goto redirty_page; | 1820 | goto redirty_page; |
1817 | } | 1821 | } |
1818 | if (commit_write) | 1822 | if (commit_write) |