aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/alloc.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index cdf96974a6a2..ec9c2ce7bb0c 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -3809,10 +3809,10 @@ static void ocfs2_subtract_from_rec(struct super_block *sb,
3809 * list. If this leaf is part of an allocation tree, it is assumed 3809 * list. If this leaf is part of an allocation tree, it is assumed
3810 * that the tree above has been prepared. 3810 * that the tree above has been prepared.
3811 */ 3811 */
3812static void ocfs2_insert_at_leaf(struct ocfs2_extent_rec *insert_rec, 3812static void ocfs2_insert_at_leaf(struct ocfs2_extent_tree *et,
3813 struct ocfs2_extent_rec *insert_rec,
3813 struct ocfs2_extent_list *el, 3814 struct ocfs2_extent_list *el,
3814 struct ocfs2_insert_type *insert, 3815 struct ocfs2_insert_type *insert)
3815 struct inode *inode)
3816{ 3816{
3817 int i = insert->ins_contig_index; 3817 int i = insert->ins_contig_index;
3818 unsigned int range; 3818 unsigned int range;
@@ -3824,7 +3824,8 @@ static void ocfs2_insert_at_leaf(struct ocfs2_extent_rec *insert_rec,
3824 i = ocfs2_search_extent_list(el, le32_to_cpu(insert_rec->e_cpos)); 3824 i = ocfs2_search_extent_list(el, le32_to_cpu(insert_rec->e_cpos));
3825 BUG_ON(i == -1); 3825 BUG_ON(i == -1);
3826 rec = &el->l_recs[i]; 3826 rec = &el->l_recs[i];
3827 ocfs2_subtract_from_rec(inode->i_sb, insert->ins_split, rec, 3827 ocfs2_subtract_from_rec(ocfs2_metadata_cache_get_super(et->et_ci),
3828 insert->ins_split, rec,
3828 insert_rec); 3829 insert_rec);
3829 goto rotate; 3830 goto rotate;
3830 } 3831 }
@@ -3866,10 +3867,10 @@ static void ocfs2_insert_at_leaf(struct ocfs2_extent_rec *insert_rec,
3866 3867
3867 mlog_bug_on_msg(le16_to_cpu(el->l_next_free_rec) >= 3868 mlog_bug_on_msg(le16_to_cpu(el->l_next_free_rec) >=
3868 le16_to_cpu(el->l_count), 3869 le16_to_cpu(el->l_count),
3869 "inode %lu, depth %u, count %u, next free %u, " 3870 "owner %llu, depth %u, count %u, next free %u, "
3870 "rec.cpos %u, rec.clusters %u, " 3871 "rec.cpos %u, rec.clusters %u, "
3871 "insert.cpos %u, insert.clusters %u\n", 3872 "insert.cpos %u, insert.clusters %u\n",
3872 inode->i_ino, 3873 ocfs2_metadata_cache_owner(et->et_ci),
3873 le16_to_cpu(el->l_tree_depth), 3874 le16_to_cpu(el->l_tree_depth),
3874 le16_to_cpu(el->l_count), 3875 le16_to_cpu(el->l_count),
3875 le16_to_cpu(el->l_next_free_rec), 3876 le16_to_cpu(el->l_next_free_rec),
@@ -4171,8 +4172,8 @@ static int ocfs2_insert_path(struct inode *inode,
4171 if (ret) 4172 if (ret)
4172 mlog_errno(ret); 4173 mlog_errno(ret);
4173 } else 4174 } else
4174 ocfs2_insert_at_leaf(insert_rec, path_leaf_el(right_path), 4175 ocfs2_insert_at_leaf(et, insert_rec, path_leaf_el(right_path),
4175 insert, inode); 4176 insert);
4176 4177
4177 ret = ocfs2_journal_dirty(handle, leaf_bh); 4178 ret = ocfs2_journal_dirty(handle, leaf_bh);
4178 if (ret) 4179 if (ret)
@@ -4218,7 +4219,7 @@ static int ocfs2_do_insert_extent(struct inode *inode,
4218 } 4219 }
4219 4220
4220 if (le16_to_cpu(el->l_tree_depth) == 0) { 4221 if (le16_to_cpu(el->l_tree_depth) == 0) {
4221 ocfs2_insert_at_leaf(insert_rec, el, type, inode); 4222 ocfs2_insert_at_leaf(et, insert_rec, el, type);
4222 goto out_update_clusters; 4223 goto out_update_clusters;
4223 } 4224 }
4224 4225