Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Oct 2010 22:46:57 +0000 (15:46 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Oct 2010 22:46:57 +0000 (15:46 -0700)
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: BUG_ON fix: check if page has buffers before calling page_buffers()

fs/ext4/inode.c

index 2d6c6c8c036df496f0b44e549d800d26494abdef..1916164704667dc3c190ab327781933fa7c5f4b8 100644 (file)
@@ -2718,7 +2718,7 @@ static int ext4_writepage(struct page *page,
         * try to create them using __block_write_begin.  If this
         * fails, redirty the page and move on.
         */
-       if (!page_buffers(page)) {
+       if (!page_has_buffers(page)) {
                if (__block_write_begin(page, 0, len,
                                        noalloc_get_block_write)) {
                redirty_page:
@@ -2732,12 +2732,10 @@ static int ext4_writepage(struct page *page,
        if (walk_page_buffers(NULL, page_bufs, 0, len, NULL,
                              ext4_bh_delay_or_unwritten)) {
                /*
-                * 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.  If we don't
-                * have mapping block we just ignore them. We can also
-                * reach here via shrink_page_list
+                * 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
                 */
                goto redirty_page;
        }