Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 20971
b: refs/heads/master
c: cd6ef84
h: refs/heads/master
i:
  20969: ff08808
  20967: fada3c6
v: v3
  • Loading branch information
Badari Pulavarty authored and Linus Torvalds committed Mar 11, 2006
1 parent 8bf360e commit dedb3e1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0adb25d2e71ab047423d6fc63d5d184590d0a66f
refs/heads/master: cd6ef84e6ac9454080707f2f338360f5d7e556fc
17 changes: 8 additions & 9 deletions trunk/fs/ext3/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1624,15 +1624,14 @@ static int ext3_block_truncate_page(handle_t *handle, struct page *page,
* For "nobh" option, we can only work if we don't need to
* read-in the page - otherwise we create buffers to do the IO.
*/
if (!page_has_buffers(page) && test_opt(inode->i_sb, NOBH)) {
if (PageUptodate(page)) {
kaddr = kmap_atomic(page, KM_USER0);
memset(kaddr + offset, 0, length);
flush_dcache_page(page);
kunmap_atomic(kaddr, KM_USER0);
set_page_dirty(page);
goto unlock;
}
if (!page_has_buffers(page) && test_opt(inode->i_sb, NOBH) &&
ext3_should_writeback_data(inode) && PageUptodate(page)) {
kaddr = kmap_atomic(page, KM_USER0);
memset(kaddr + offset, 0, length);
flush_dcache_page(page);
kunmap_atomic(kaddr, KM_USER0);
set_page_dirty(page);
goto unlock;
}

if (!page_has_buffers(page))
Expand Down

0 comments on commit dedb3e1

Please sign in to comment.