diff options
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r-- | fs/ocfs2/file.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 19d16f2ef81e..4c7a4d8ed32c 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -444,7 +444,6 @@ static int ocfs2_truncate_file(struct inode *inode, | |||
444 | int status = 0; | 444 | int status = 0; |
445 | struct ocfs2_dinode *fe = NULL; | 445 | struct ocfs2_dinode *fe = NULL; |
446 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 446 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
447 | struct ocfs2_truncate_context *tc = NULL; | ||
448 | 447 | ||
449 | mlog_entry("(inode = %llu, new_i_size = %llu\n", | 448 | mlog_entry("(inode = %llu, new_i_size = %llu\n", |
450 | (unsigned long long)OCFS2_I(inode)->ip_blkno, | 449 | (unsigned long long)OCFS2_I(inode)->ip_blkno, |
@@ -515,13 +514,7 @@ static int ocfs2_truncate_file(struct inode *inode, | |||
515 | goto bail_unlock_sem; | 514 | goto bail_unlock_sem; |
516 | } | 515 | } |
517 | 516 | ||
518 | status = ocfs2_prepare_truncate(osb, inode, di_bh, &tc); | 517 | status = ocfs2_commit_truncate(osb, inode, di_bh); |
519 | if (status < 0) { | ||
520 | mlog_errno(status); | ||
521 | goto bail_unlock_sem; | ||
522 | } | ||
523 | |||
524 | status = ocfs2_commit_truncate(osb, inode, di_bh, tc); | ||
525 | if (status < 0) { | 518 | if (status < 0) { |
526 | mlog_errno(status); | 519 | mlog_errno(status); |
527 | goto bail_unlock_sem; | 520 | goto bail_unlock_sem; |
@@ -1494,7 +1487,7 @@ static int ocfs2_remove_inode_range(struct inode *inode, | |||
1494 | if (phys_cpos != 0) { | 1487 | if (phys_cpos != 0) { |
1495 | ret = ocfs2_remove_btree_range(inode, &et, cpos, | 1488 | ret = ocfs2_remove_btree_range(inode, &et, cpos, |
1496 | phys_cpos, alloc_size, | 1489 | phys_cpos, alloc_size, |
1497 | &dealloc); | 1490 | 0, &dealloc, 0); |
1498 | if (ret) { | 1491 | if (ret) { |
1499 | mlog_errno(ret); | 1492 | mlog_errno(ret); |
1500 | goto out; | 1493 | goto out; |