diff options
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r-- | fs/ocfs2/file.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index ca3d38addbb9..441c6a94059d 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -512,12 +512,11 @@ int ocfs2_add_inode_data(struct ocfs2_super *osb, | |||
512 | int ret; | 512 | int ret; |
513 | struct ocfs2_extent_tree et; | 513 | struct ocfs2_extent_tree et; |
514 | 514 | ||
515 | ocfs2_get_dinode_extent_tree(&et, inode, fe_bh); | 515 | ocfs2_init_dinode_extent_tree(&et, inode, fe_bh); |
516 | ret = ocfs2_add_clusters_in_btree(osb, inode, logical_offset, | 516 | ret = ocfs2_add_clusters_in_btree(osb, inode, logical_offset, |
517 | clusters_to_add, mark_unwritten, | 517 | clusters_to_add, mark_unwritten, |
518 | &et, handle, | 518 | &et, handle, |
519 | data_ac, meta_ac, reason_ret); | 519 | data_ac, meta_ac, reason_ret); |
520 | ocfs2_put_extent_tree(&et); | ||
521 | 520 | ||
522 | return ret; | 521 | return ret; |
523 | } | 522 | } |
@@ -568,10 +567,9 @@ restart_all: | |||
568 | (unsigned long long)OCFS2_I(inode)->ip_blkno, | 567 | (unsigned long long)OCFS2_I(inode)->ip_blkno, |
569 | (long long)i_size_read(inode), le32_to_cpu(fe->i_clusters), | 568 | (long long)i_size_read(inode), le32_to_cpu(fe->i_clusters), |
570 | clusters_to_add); | 569 | clusters_to_add); |
571 | ocfs2_get_dinode_extent_tree(&et, inode, bh); | 570 | ocfs2_init_dinode_extent_tree(&et, inode, bh); |
572 | status = ocfs2_lock_allocators(inode, &et, clusters_to_add, 0, | 571 | status = ocfs2_lock_allocators(inode, &et, clusters_to_add, 0, |
573 | &data_ac, &meta_ac); | 572 | &data_ac, &meta_ac); |
574 | ocfs2_put_extent_tree(&et); | ||
575 | if (status) { | 573 | if (status) { |
576 | mlog_errno(status); | 574 | mlog_errno(status); |
577 | goto leave; | 575 | goto leave; |
@@ -1243,11 +1241,10 @@ static int __ocfs2_remove_inode_range(struct inode *inode, | |||
1243 | struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data; | 1241 | struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data; |
1244 | struct ocfs2_extent_tree et; | 1242 | struct ocfs2_extent_tree et; |
1245 | 1243 | ||
1246 | ocfs2_get_dinode_extent_tree(&et, inode, di_bh); | 1244 | ocfs2_init_dinode_extent_tree(&et, inode, di_bh); |
1247 | 1245 | ||
1248 | ret = ocfs2_lock_allocators(inode, &et, 0, 1, NULL, &meta_ac); | 1246 | ret = ocfs2_lock_allocators(inode, &et, 0, 1, NULL, &meta_ac); |
1249 | if (ret) { | 1247 | if (ret) { |
1250 | ocfs2_put_extent_tree(&et); | ||
1251 | mlog_errno(ret); | 1248 | mlog_errno(ret); |
1252 | return ret; | 1249 | return ret; |
1253 | } | 1250 | } |
@@ -1304,7 +1301,6 @@ out: | |||
1304 | if (meta_ac) | 1301 | if (meta_ac) |
1305 | ocfs2_free_alloc_context(meta_ac); | 1302 | ocfs2_free_alloc_context(meta_ac); |
1306 | 1303 | ||
1307 | ocfs2_put_extent_tree(&et); | ||
1308 | return ret; | 1304 | return ret; |
1309 | } | 1305 | } |
1310 | 1306 | ||