From: Mark Fasheh Date: Mon, 14 May 2007 18:39:40 +0000 (-0700) Subject: ocfs2: unmap_mapping_range() in ocfs2_truncate() X-Git-Tag: v2.6.22-rc3~7 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1024c902abdcbd2425aa850d7ef04e013ffb35f0;p=linux-2.6 ocfs2: unmap_mapping_range() in ocfs2_truncate() We weren't calling this before, but since ocfs2 handles the entire truncate operation, we should. Signed-off-by: Mark Fasheh --- diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 9395b4fa54..d459eb93b7 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -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;