Commit e46f74dc authored by Joel Becker's avatar Joel Becker

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

It already has struct ocfs2_extent_tree, which has the caching info.  So
we don't need to pass it struct inode.
Signed-off-by: default avatarJoel Becker <joel.becker@oracle.com>
parent 1e2dd63f
...@@ -2871,24 +2871,24 @@ out: ...@@ -2871,24 +2871,24 @@ out:
return ret; return ret;
} }
static int __ocfs2_rotate_tree_left(struct inode *inode, static int __ocfs2_rotate_tree_left(handle_t *handle,
handle_t *handle, int orig_credits, struct ocfs2_extent_tree *et,
int orig_credits,
struct ocfs2_path *path, struct ocfs2_path *path,
struct ocfs2_cached_dealloc_ctxt *dealloc, struct ocfs2_cached_dealloc_ctxt *dealloc,
struct ocfs2_path **empty_extent_path, struct ocfs2_path **empty_extent_path)
struct ocfs2_extent_tree *et)
{ {
int ret, subtree_root, deleted; int ret, subtree_root, deleted;
u32 right_cpos; u32 right_cpos;
struct ocfs2_path *left_path = NULL; struct ocfs2_path *left_path = NULL;
struct ocfs2_path *right_path = NULL; struct ocfs2_path *right_path = NULL;
struct super_block *sb = ocfs2_metadata_cache_get_super(et->et_ci);
BUG_ON(!ocfs2_is_empty_extent(&(path_leaf_el(path)->l_recs[0]))); BUG_ON(!ocfs2_is_empty_extent(&(path_leaf_el(path)->l_recs[0])));
*empty_extent_path = NULL; *empty_extent_path = NULL;
ret = ocfs2_find_cpos_for_right_leaf(inode->i_sb, path, ret = ocfs2_find_cpos_for_right_leaf(sb, path, &right_cpos);
&right_cpos);
if (ret) { if (ret) {
mlog_errno(ret); mlog_errno(ret);
goto out; goto out;
...@@ -2937,7 +2937,7 @@ static int __ocfs2_rotate_tree_left(struct inode *inode, ...@@ -2937,7 +2937,7 @@ static int __ocfs2_rotate_tree_left(struct inode *inode,
* Caller might still want to make changes to the * Caller might still want to make changes to the
* tree root, so re-add it to the journal here. * tree root, so re-add it to the journal here.
*/ */
ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), ret = ocfs2_path_bh_journal_access(handle, et->et_ci,
left_path, 0); left_path, 0);
if (ret) { if (ret) {
mlog_errno(ret); mlog_errno(ret);
...@@ -2973,7 +2973,7 @@ static int __ocfs2_rotate_tree_left(struct inode *inode, ...@@ -2973,7 +2973,7 @@ static int __ocfs2_rotate_tree_left(struct inode *inode,
ocfs2_mv_path(left_path, right_path); ocfs2_mv_path(left_path, right_path);
ret = ocfs2_find_cpos_for_right_leaf(inode->i_sb, left_path, ret = ocfs2_find_cpos_for_right_leaf(sb, left_path,
&right_cpos); &right_cpos);
if (ret) { if (ret) {
mlog_errno(ret); mlog_errno(ret);
...@@ -3187,8 +3187,8 @@ rightmost_no_delete: ...@@ -3187,8 +3187,8 @@ rightmost_no_delete:
* and restarting from there. * and restarting from there.
*/ */
try_rotate: try_rotate:
ret = __ocfs2_rotate_tree_left(inode, handle, orig_credits, path, ret = __ocfs2_rotate_tree_left(handle, et, orig_credits, path,
dealloc, &restart_path, et); dealloc, &restart_path);
if (ret && ret != -EAGAIN) { if (ret && ret != -EAGAIN) {
mlog_errno(ret); mlog_errno(ret);
goto out; goto out;
...@@ -3198,9 +3198,9 @@ try_rotate: ...@@ -3198,9 +3198,9 @@ try_rotate:
tmp_path = restart_path; tmp_path = restart_path;
restart_path = NULL; restart_path = NULL;
ret = __ocfs2_rotate_tree_left(inode, handle, orig_credits, ret = __ocfs2_rotate_tree_left(handle, et, orig_credits,
tmp_path, dealloc, tmp_path, dealloc,
&restart_path, et); &restart_path);
if (ret && ret != -EAGAIN) { if (ret && ret != -EAGAIN) {
mlog_errno(ret); mlog_errno(ret);
goto out; goto out;
......
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