diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2007-08-31 13:23:41 -0400 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2007-09-11 14:39:46 -0400 |
commit | e535e2efd295c3990bb9f654c8bb6bd176ebdc2b (patch) | |
tree | 5f519f1003a7f5700e5e8d62d477382bc806d738 /fs/ocfs2/alloc.c | |
parent | 30b8548f2c270c0205558fe4826a6ab8e7fe51ad (diff) |
ocfs2: Fix calculation of i_blocks during truncate
We were setting i_blocks too early - before truncating any allocation.
Correct things to set i_blocks after the allocation change.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/alloc.c')
-rw-r--r-- | fs/ocfs2/alloc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 4f517665c9a0..778a850b4634 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -5602,6 +5602,7 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb, | |||
5602 | clusters_to_del; | 5602 | clusters_to_del; |
5603 | spin_unlock(&OCFS2_I(inode)->ip_lock); | 5603 | spin_unlock(&OCFS2_I(inode)->ip_lock); |
5604 | le32_add_cpu(&fe->i_clusters, -clusters_to_del); | 5604 | le32_add_cpu(&fe->i_clusters, -clusters_to_del); |
5605 | inode->i_blocks = ocfs2_inode_sector_count(inode); | ||
5605 | 5606 | ||
5606 | status = ocfs2_trim_tree(inode, path, handle, tc, | 5607 | status = ocfs2_trim_tree(inode, path, handle, tc, |
5607 | clusters_to_del, &delete_blk); | 5608 | clusters_to_del, &delete_blk); |