aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext3/inode.c')
-rw-r--r--fs/ext3/inode.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index 8824e84f8a56..0384e539b88f 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -1559,6 +1559,7 @@ static struct address_space_operations ext3_ordered_aops = {
1559 .invalidatepage = ext3_invalidatepage, 1559 .invalidatepage = ext3_invalidatepage,
1560 .releasepage = ext3_releasepage, 1560 .releasepage = ext3_releasepage,
1561 .direct_IO = ext3_direct_IO, 1561 .direct_IO = ext3_direct_IO,
1562 .migratepage = buffer_migrate_page,
1562}; 1563};
1563 1564
1564static struct address_space_operations ext3_writeback_aops = { 1565static struct address_space_operations ext3_writeback_aops = {
@@ -1572,6 +1573,7 @@ static struct address_space_operations ext3_writeback_aops = {
1572 .invalidatepage = ext3_invalidatepage, 1573 .invalidatepage = ext3_invalidatepage,
1573 .releasepage = ext3_releasepage, 1574 .releasepage = ext3_releasepage,
1574 .direct_IO = ext3_direct_IO, 1575 .direct_IO = ext3_direct_IO,
1576 .migratepage = buffer_migrate_page,
1575}; 1577};
1576 1578
1577static struct address_space_operations ext3_journalled_aops = { 1579static struct address_space_operations ext3_journalled_aops = {
@@ -1622,15 +1624,14 @@ static int ext3_block_truncate_page(handle_t *handle, struct page *page,
1622 * For "nobh" option, we can only work if we don't need to 1624 * For "nobh" option, we can only work if we don't need to
1623 * read-in the page - otherwise we create buffers to do the IO. 1625 * read-in the page - otherwise we create buffers to do the IO.
1624 */ 1626 */
1625 if (!page_has_buffers(page) && test_opt(inode->i_sb, NOBH)) { 1627 if (!page_has_buffers(page) && test_opt(inode->i_sb, NOBH) &&
1626 if (PageUptodate(page)) { 1628 ext3_should_writeback_data(inode) && PageUptodate(page)) {
1627 kaddr = kmap_atomic(page, KM_USER0); 1629 kaddr = kmap_atomic(page, KM_USER0);
1628 memset(kaddr + offset, 0, length); 1630 memset(kaddr + offset, 0, length);
1629 flush_dcache_page(page); 1631 flush_dcache_page(page);
1630 kunmap_atomic(kaddr, KM_USER0); 1632 kunmap_atomic(kaddr, KM_USER0);
1631 set_page_dirty(page); 1633 set_page_dirty(page);
1632 goto unlock; 1634 goto unlock;
1633 }
1634 } 1635 }
1635 1636
1636 if (!page_has_buffers(page)) 1637 if (!page_has_buffers(page))