Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61253
b: refs/heads/master
c: fc0e15a
h: refs/heads/master
i:
  61251: cc02a7b
v: v3
  • Loading branch information
Eric Sandeen authored and Theodore Ts'o committed Jul 18, 2007
1 parent 7a4b3f1 commit 1f4b993
Show file tree
Hide file tree
Showing 2 changed files with 3 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: f8628a14a27eb4512a1ede43de1d9db4d9f92bc3
refs/heads/master: fc0e15a667121e02686cc52679f6272959fb60cc
11 changes: 2 additions & 9 deletions trunk/fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1766,7 +1766,6 @@ int ext4_block_truncate_page(handle_t *handle, struct page *page,
struct inode *inode = mapping->host;
struct buffer_head *bh;
int err = 0;
void *kaddr;

blocksize = inode->i_sb->s_blocksize;
length = blocksize - (offset & (blocksize - 1));
Expand All @@ -1778,10 +1777,7 @@ int ext4_block_truncate_page(handle_t *handle, struct page *page,
*/
if (!page_has_buffers(page) && test_opt(inode->i_sb, NOBH) &&
ext4_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);
zero_user_page(page, offset, length, KM_USER0);
set_page_dirty(page);
goto unlock;
}
Expand Down Expand Up @@ -1834,10 +1830,7 @@ int ext4_block_truncate_page(handle_t *handle, struct page *page,
goto unlock;
}

kaddr = kmap_atomic(page, KM_USER0);
memset(kaddr + offset, 0, length);
flush_dcache_page(page);
kunmap_atomic(kaddr, KM_USER0);
zero_user_page(page, offset, length, KM_USER0);

BUFFER_TRACE(bh, "zeroed end of block");

Expand Down

0 comments on commit 1f4b993

Please sign in to comment.