diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 18:46:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 18:46:57 -0400 |
commit | 671f837a04cbcaaa10e8404989cf08ca3fdf1c80 (patch) | |
tree | d98a55d2e347ad15a73cbd860d1fd71a61be20bd /fs/ext4 | |
parent | c9e2a72ff1acfdffdecb338b3d997f90c507e665 (diff) | |
parent | b1142e8fec6a594723e5054055a7b53379b90490 (diff) |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
* '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()
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/inode.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 2d6c6c8c036d..191616470466 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -2718,7 +2718,7 @@ static int ext4_writepage(struct page *page, | |||
2718 | * try to create them using __block_write_begin. If this | 2718 | * try to create them using __block_write_begin. If this |
2719 | * fails, redirty the page and move on. | 2719 | * fails, redirty the page and move on. |
2720 | */ | 2720 | */ |
2721 | if (!page_buffers(page)) { | 2721 | if (!page_has_buffers(page)) { |
2722 | if (__block_write_begin(page, 0, len, | 2722 | if (__block_write_begin(page, 0, len, |
2723 | noalloc_get_block_write)) { | 2723 | noalloc_get_block_write)) { |
2724 | redirty_page: | 2724 | redirty_page: |
@@ -2732,12 +2732,10 @@ static int ext4_writepage(struct page *page, | |||
2732 | if (walk_page_buffers(NULL, page_bufs, 0, len, NULL, | 2732 | if (walk_page_buffers(NULL, page_bufs, 0, len, NULL, |
2733 | ext4_bh_delay_or_unwritten)) { | 2733 | ext4_bh_delay_or_unwritten)) { |
2734 | /* | 2734 | /* |
2735 | * We don't want to do block allocation So redirty the | 2735 | * We don't want to do block allocation, so redirty |
2736 | * page and return We may reach here when we do a | 2736 | * the page and return. We may reach here when we do |
2737 | * journal commit via | 2737 | * a journal commit via journal_submit_inode_data_buffers. |
2738 | * journal_submit_inode_data_buffers. If we don't | 2738 | * We can also reach here via shrink_page_list |
2739 | * have mapping block we just ignore them. We can also | ||
2740 | * reach here via shrink_page_list | ||
2741 | */ | 2739 | */ |
2742 | goto redirty_page; | 2740 | goto redirty_page; |
2743 | } | 2741 | } |