Commit 1e2dd63f authored by Joel Becker's avatar Joel Becker

ocfs2: ocfs2_rotate_subtree_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 09106bae
...@@ -2602,13 +2602,13 @@ static void ocfs2_unlink_subtree(handle_t *handle, ...@@ -2602,13 +2602,13 @@ static void ocfs2_unlink_subtree(handle_t *handle,
subtree_index + 1); subtree_index + 1);
} }
static int ocfs2_rotate_subtree_left(struct inode *inode, handle_t *handle, static int ocfs2_rotate_subtree_left(handle_t *handle,
struct ocfs2_extent_tree *et,
struct ocfs2_path *left_path, struct ocfs2_path *left_path,
struct ocfs2_path *right_path, struct ocfs2_path *right_path,
int subtree_index, int subtree_index,
struct ocfs2_cached_dealloc_ctxt *dealloc, struct ocfs2_cached_dealloc_ctxt *dealloc,
int *deleted, int *deleted)
struct ocfs2_extent_tree *et)
{ {
int ret, i, del_right_subtree = 0, right_has_empty = 0; int ret, i, del_right_subtree = 0, right_has_empty = 0;
struct buffer_head *root_bh, *et_root_bh = path_root_bh(right_path); struct buffer_head *root_bh, *et_root_bh = path_root_bh(right_path);
...@@ -2644,7 +2644,7 @@ static int ocfs2_rotate_subtree_left(struct inode *inode, handle_t *handle, ...@@ -2644,7 +2644,7 @@ static int ocfs2_rotate_subtree_left(struct inode *inode, handle_t *handle,
return -EAGAIN; return -EAGAIN;
if (le16_to_cpu(right_leaf_el->l_next_free_rec) > 1) { if (le16_to_cpu(right_leaf_el->l_next_free_rec) > 1) {
ret = ocfs2_journal_access_eb(handle, INODE_CACHE(inode), ret = ocfs2_journal_access_eb(handle, et->et_ci,
path_leaf_bh(right_path), path_leaf_bh(right_path),
OCFS2_JOURNAL_ACCESS_WRITE); OCFS2_JOURNAL_ACCESS_WRITE);
if (ret) { if (ret) {
...@@ -2679,7 +2679,7 @@ static int ocfs2_rotate_subtree_left(struct inode *inode, handle_t *handle, ...@@ -2679,7 +2679,7 @@ static int ocfs2_rotate_subtree_left(struct inode *inode, handle_t *handle,
*/ */
BUG_ON(right_has_empty && !del_right_subtree); BUG_ON(right_has_empty && !del_right_subtree);
ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), right_path, ret = ocfs2_path_bh_journal_access(handle, et->et_ci, right_path,
subtree_index); subtree_index);
if (ret) { if (ret) {
mlog_errno(ret); mlog_errno(ret);
...@@ -2687,14 +2687,14 @@ static int ocfs2_rotate_subtree_left(struct inode *inode, handle_t *handle, ...@@ -2687,14 +2687,14 @@ static int ocfs2_rotate_subtree_left(struct inode *inode, handle_t *handle,
} }
for(i = subtree_index + 1; i < path_num_items(right_path); i++) { for(i = subtree_index + 1; i < path_num_items(right_path); i++) {
ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), ret = ocfs2_path_bh_journal_access(handle, et->et_ci,
right_path, i); right_path, i);
if (ret) { if (ret) {
mlog_errno(ret); mlog_errno(ret);
goto out; goto out;
} }
ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), ret = ocfs2_path_bh_journal_access(handle, et->et_ci,
left_path, i); left_path, i);
if (ret) { if (ret) {
mlog_errno(ret); mlog_errno(ret);
...@@ -2944,9 +2944,9 @@ static int __ocfs2_rotate_tree_left(struct inode *inode, ...@@ -2944,9 +2944,9 @@ static int __ocfs2_rotate_tree_left(struct inode *inode,
goto out; goto out;
} }
ret = ocfs2_rotate_subtree_left(inode, handle, left_path, ret = ocfs2_rotate_subtree_left(handle, et, left_path,
right_path, subtree_root, right_path, subtree_root,
dealloc, &deleted, et); dealloc, &deleted);
if (ret == -EAGAIN) { if (ret == -EAGAIN) {
/* /*
* The rotation has to temporarily stop due to * The rotation has to temporarily stop due to
......
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