Commit 6641b0ce authored by Joel Becker's avatar Joel Becker

ocfs2: Pass ocfs2_extent_tree to ocfs2_unlink_path()

ocfs2_unlink_path() doesn't need struct inode, so let's pass it struct
ocfs2_extent_tree.
Signed-off-by: default avatarJoel Becker <joel.becker@oracle.com>
parent 42a5a7a9
......@@ -2536,7 +2536,8 @@ static int ocfs2_update_edge_lengths(struct inode *inode, handle_t *handle,
return ret;
}
static void ocfs2_unlink_path(struct inode *inode, handle_t *handle,
static void ocfs2_unlink_path(handle_t *handle,
struct ocfs2_extent_tree *et,
struct ocfs2_cached_dealloc_ctxt *dealloc,
struct ocfs2_path *path, int unlink_start)
{
......@@ -2558,12 +2559,12 @@ static void ocfs2_unlink_path(struct inode *inode, handle_t *handle,
mlog(ML_ERROR,
"Inode %llu, attempted to remove extent block "
"%llu with %u records\n",
(unsigned long long)OCFS2_I(inode)->ip_blkno,
(unsigned long long)ocfs2_metadata_cache_owner(et->et_ci),
(unsigned long long)le64_to_cpu(eb->h_blkno),
le16_to_cpu(el->l_next_free_rec));
ocfs2_journal_dirty(handle, bh);
ocfs2_remove_from_cache(INODE_CACHE(inode), bh);
ocfs2_remove_from_cache(et->et_ci, bh);
continue;
}
......@@ -2576,11 +2577,12 @@ static void ocfs2_unlink_path(struct inode *inode, handle_t *handle,
if (ret)
mlog_errno(ret);
ocfs2_remove_from_cache(INODE_CACHE(inode), bh);
ocfs2_remove_from_cache(et->et_ci, bh);
}
}
static void ocfs2_unlink_subtree(struct inode *inode, handle_t *handle,
static void ocfs2_unlink_subtree(handle_t *handle,
struct ocfs2_extent_tree *et,
struct ocfs2_path *left_path,
struct ocfs2_path *right_path,
int subtree_index,
......@@ -2611,7 +2613,7 @@ static void ocfs2_unlink_subtree(struct inode *inode, handle_t *handle,
ocfs2_journal_dirty(handle, root_bh);
ocfs2_journal_dirty(handle, path_leaf_bh(left_path));
ocfs2_unlink_path(inode, handle, dealloc, right_path,
ocfs2_unlink_path(handle, et, dealloc, right_path,
subtree_index + 1);
}
......@@ -2744,7 +2746,7 @@ static int ocfs2_rotate_subtree_left(struct inode *inode, handle_t *handle,
mlog_errno(ret);
if (del_right_subtree) {
ocfs2_unlink_subtree(inode, handle, left_path, right_path,
ocfs2_unlink_subtree(handle, et, left_path, right_path,
subtree_index, dealloc);
ret = ocfs2_update_edge_lengths(inode, handle, subtree_index,
left_path);
......@@ -3067,7 +3069,7 @@ static int ocfs2_remove_rightmost_path(struct inode *inode, handle_t *handle,
subtree_index = ocfs2_find_subtree_root(inode, left_path, path);
ocfs2_unlink_subtree(inode, handle, left_path, path,
ocfs2_unlink_subtree(handle, et, left_path, path,
subtree_index, dealloc);
ret = ocfs2_update_edge_lengths(inode, handle, subtree_index,
left_path);
......@@ -3086,7 +3088,7 @@ static int ocfs2_remove_rightmost_path(struct inode *inode, handle_t *handle,
* revert the inode back to having extents
* in-line.
*/
ocfs2_unlink_path(inode, handle, dealloc, path, 1);
ocfs2_unlink_path(handle, et, dealloc, path, 1);
el = et->et_root_el;
el->l_tree_depth = 0;
......
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