Merge branch 'omap_clock_fixes_3.2' of git://git.pwsan.com/linux-2.6 into fixes
[pandora-kernel.git] / fs / ext4 / inode.c
index 986e238..0defe0b 100644 (file)
@@ -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)) ==
+                                                               PF_MEMALLOC);
                goto redirty_page;
        }
        if (commit_write)