diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-03-11 13:35:31 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-11 13:35:31 -0500 |
commit | 749dfc70554f2c9e6624ac843d66571265ed9338 (patch) | |
tree | bf591255b3f158222f90852d53c4279e6e7e9ced /fs/ext3/inode.c | |
parent | 74f5ec29ae93aa42c49f4285c20c457afe937881 (diff) | |
parent | 0992a5d029181421877a716eaf99145828ff7eae (diff) |
Merge branch 'upstream-fixes'
Diffstat (limited to 'fs/ext3/inode.c')
-rw-r--r-- | fs/ext3/inode.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index 3fc4238e9703..0384e539b88f 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c | |||
@@ -1624,15 +1624,14 @@ static int ext3_block_truncate_page(handle_t *handle, struct page *page, | |||
1624 | * 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 |
1625 | * 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. |
1626 | */ | 1626 | */ |
1627 | if (!page_has_buffers(page) && test_opt(inode->i_sb, NOBH)) { | 1627 | if (!page_has_buffers(page) && test_opt(inode->i_sb, NOBH) && |
1628 | if (PageUptodate(page)) { | 1628 | ext3_should_writeback_data(inode) && PageUptodate(page)) { |
1629 | kaddr = kmap_atomic(page, KM_USER0); | 1629 | kaddr = kmap_atomic(page, KM_USER0); |
1630 | memset(kaddr + offset, 0, length); | 1630 | memset(kaddr + offset, 0, length); |
1631 | flush_dcache_page(page); | 1631 | flush_dcache_page(page); |
1632 | kunmap_atomic(kaddr, KM_USER0); | 1632 | kunmap_atomic(kaddr, KM_USER0); |
1633 | set_page_dirty(page); | 1633 | set_page_dirty(page); |
1634 | goto unlock; | 1634 | goto unlock; |
1635 | } | ||
1636 | } | 1635 | } |
1637 | 1636 | ||
1638 | if (!page_has_buffers(page)) | 1637 | if (!page_has_buffers(page)) |