Skip to content

Commit

Permalink
ocfs2: unmap_mapping_range() in ocfs2_truncate()
Browse files Browse the repository at this point in the history
We weren't calling this before, but since ocfs2 handles the entire truncate
operation, we should.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
  • Loading branch information
Mark Fasheh committed May 25, 2007
1 parent e9dfc0b commit 1024c90
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ static int ocfs2_truncate_file(struct inode *inode,
(unsigned long long)OCFS2_I(inode)->ip_blkno,
(unsigned long long)new_i_size);

unmap_mapping_range(inode->i_mapping, new_i_size + PAGE_SIZE - 1, 0, 1);
truncate_inode_pages(inode->i_mapping, new_i_size);

fe = (struct ocfs2_dinode *) di_bh->b_data;
Expand Down

0 comments on commit 1024c90

Please sign in to comment.