Commit d5628623 authored by Joel Becker's avatar Joel Becker

ocfs2: ocfs2_insert_at_leaf() doesn't need struct inode.

Give it an ocfs2_extent_tree and it is happy.
Signed-off-by: default avatarJoel Becker <joel.becker@oracle.com>
parent 4c911eef
...@@ -3809,10 +3809,10 @@ static void ocfs2_subtract_from_rec(struct super_block *sb, ...@@ -3809,10 +3809,10 @@ static void ocfs2_subtract_from_rec(struct super_block *sb,
* list. If this leaf is part of an allocation tree, it is assumed * list. If this leaf is part of an allocation tree, it is assumed
* that the tree above has been prepared. * that the tree above has been prepared.
*/ */
static void ocfs2_insert_at_leaf(struct ocfs2_extent_rec *insert_rec, static void ocfs2_insert_at_leaf(struct ocfs2_extent_tree *et,
struct ocfs2_extent_rec *insert_rec,
struct ocfs2_extent_list *el, struct ocfs2_extent_list *el,
struct ocfs2_insert_type *insert, struct ocfs2_insert_type *insert)
struct inode *inode)
{ {
int i = insert->ins_contig_index; int i = insert->ins_contig_index;
unsigned int range; unsigned int range;
...@@ -3824,7 +3824,8 @@ static void ocfs2_insert_at_leaf(struct ocfs2_extent_rec *insert_rec, ...@@ -3824,7 +3824,8 @@ static void ocfs2_insert_at_leaf(struct ocfs2_extent_rec *insert_rec,
i = ocfs2_search_extent_list(el, le32_to_cpu(insert_rec->e_cpos)); i = ocfs2_search_extent_list(el, le32_to_cpu(insert_rec->e_cpos));
BUG_ON(i == -1); BUG_ON(i == -1);
rec = &el->l_recs[i]; rec = &el->l_recs[i];
ocfs2_subtract_from_rec(inode->i_sb, insert->ins_split, rec, ocfs2_subtract_from_rec(ocfs2_metadata_cache_get_super(et->et_ci),
insert->ins_split, rec,
insert_rec); insert_rec);
goto rotate; goto rotate;
} }
...@@ -3866,10 +3867,10 @@ static void ocfs2_insert_at_leaf(struct ocfs2_extent_rec *insert_rec, ...@@ -3866,10 +3867,10 @@ static void ocfs2_insert_at_leaf(struct ocfs2_extent_rec *insert_rec,
mlog_bug_on_msg(le16_to_cpu(el->l_next_free_rec) >= mlog_bug_on_msg(le16_to_cpu(el->l_next_free_rec) >=
le16_to_cpu(el->l_count), le16_to_cpu(el->l_count),
"inode %lu, depth %u, count %u, next free %u, " "owner %llu, depth %u, count %u, next free %u, "
"rec.cpos %u, rec.clusters %u, " "rec.cpos %u, rec.clusters %u, "
"insert.cpos %u, insert.clusters %u\n", "insert.cpos %u, insert.clusters %u\n",
inode->i_ino, ocfs2_metadata_cache_owner(et->et_ci),
le16_to_cpu(el->l_tree_depth), le16_to_cpu(el->l_tree_depth),
le16_to_cpu(el->l_count), le16_to_cpu(el->l_count),
le16_to_cpu(el->l_next_free_rec), le16_to_cpu(el->l_next_free_rec),
...@@ -4171,8 +4172,8 @@ static int ocfs2_insert_path(struct inode *inode, ...@@ -4171,8 +4172,8 @@ static int ocfs2_insert_path(struct inode *inode,
if (ret) if (ret)
mlog_errno(ret); mlog_errno(ret);
} else } else
ocfs2_insert_at_leaf(insert_rec, path_leaf_el(right_path), ocfs2_insert_at_leaf(et, insert_rec, path_leaf_el(right_path),
insert, inode); insert);
ret = ocfs2_journal_dirty(handle, leaf_bh); ret = ocfs2_journal_dirty(handle, leaf_bh);
if (ret) if (ret)
...@@ -4218,7 +4219,7 @@ static int ocfs2_do_insert_extent(struct inode *inode, ...@@ -4218,7 +4219,7 @@ static int ocfs2_do_insert_extent(struct inode *inode,
} }
if (le16_to_cpu(el->l_tree_depth) == 0) { if (le16_to_cpu(el->l_tree_depth) == 0) {
ocfs2_insert_at_leaf(insert_rec, el, type, inode); ocfs2_insert_at_leaf(et, insert_rec, el, type);
goto out_update_clusters; goto out_update_clusters;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment