diff options
author | Joel Becker <joel.becker@oracle.com> | 2009-02-12 22:45:28 -0500 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2009-09-04 19:07:59 -0400 |
commit | 1e2dd63fe0b6e99b81904a61090db801978b9520 (patch) | |
tree | af22705466dda6be2e18d8a23a267e97ea57147b /fs/ocfs2 | |
parent | 09106bae05c3350e8d0ef0ede90b1c3da4bda2f8 (diff) |
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: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/alloc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 8efcface686..b358d567313 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -2602,13 +2602,13 @@ static void ocfs2_unlink_subtree(handle_t *handle, | |||
2602 | subtree_index + 1); | 2602 | subtree_index + 1); |
2603 | } | 2603 | } |
2604 | 2604 | ||
2605 | static int ocfs2_rotate_subtree_left(struct inode *inode, handle_t *handle, | 2605 | static int ocfs2_rotate_subtree_left(handle_t *handle, |
2606 | struct ocfs2_extent_tree *et, | ||
2606 | struct ocfs2_path *left_path, | 2607 | struct ocfs2_path *left_path, |
2607 | struct ocfs2_path *right_path, | 2608 | struct ocfs2_path *right_path, |
2608 | int subtree_index, | 2609 | int subtree_index, |
2609 | struct ocfs2_cached_dealloc_ctxt *dealloc, | 2610 | struct ocfs2_cached_dealloc_ctxt *dealloc, |
2610 | int *deleted, | 2611 | int *deleted) |
2611 | struct ocfs2_extent_tree *et) | ||
2612 | { | 2612 | { |
2613 | int ret, i, del_right_subtree = 0, right_has_empty = 0; | 2613 | int ret, i, del_right_subtree = 0, right_has_empty = 0; |
2614 | struct buffer_head *root_bh, *et_root_bh = path_root_bh(right_path); | 2614 | 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 | return -EAGAIN; | 2644 | return -EAGAIN; |
2645 | 2645 | ||
2646 | if (le16_to_cpu(right_leaf_el->l_next_free_rec) > 1) { | 2646 | if (le16_to_cpu(right_leaf_el->l_next_free_rec) > 1) { |
2647 | ret = ocfs2_journal_access_eb(handle, INODE_CACHE(inode), | 2647 | ret = ocfs2_journal_access_eb(handle, et->et_ci, |
2648 | path_leaf_bh(right_path), | 2648 | path_leaf_bh(right_path), |
2649 | OCFS2_JOURNAL_ACCESS_WRITE); | 2649 | OCFS2_JOURNAL_ACCESS_WRITE); |
2650 | if (ret) { | 2650 | if (ret) { |
@@ -2679,7 +2679,7 @@ static int ocfs2_rotate_subtree_left(struct inode *inode, handle_t *handle, | |||
2679 | */ | 2679 | */ |
2680 | BUG_ON(right_has_empty && !del_right_subtree); | 2680 | BUG_ON(right_has_empty && !del_right_subtree); |
2681 | 2681 | ||
2682 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), right_path, | 2682 | ret = ocfs2_path_bh_journal_access(handle, et->et_ci, right_path, |
2683 | subtree_index); | 2683 | subtree_index); |
2684 | if (ret) { | 2684 | if (ret) { |
2685 | mlog_errno(ret); | 2685 | mlog_errno(ret); |
@@ -2687,14 +2687,14 @@ static int ocfs2_rotate_subtree_left(struct inode *inode, handle_t *handle, | |||
2687 | } | 2687 | } |
2688 | 2688 | ||
2689 | for(i = subtree_index + 1; i < path_num_items(right_path); i++) { | 2689 | for(i = subtree_index + 1; i < path_num_items(right_path); i++) { |
2690 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), | 2690 | ret = ocfs2_path_bh_journal_access(handle, et->et_ci, |
2691 | right_path, i); | 2691 | right_path, i); |
2692 | if (ret) { | 2692 | if (ret) { |
2693 | mlog_errno(ret); | 2693 | mlog_errno(ret); |
2694 | goto out; | 2694 | goto out; |
2695 | } | 2695 | } |
2696 | 2696 | ||
2697 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), | 2697 | ret = ocfs2_path_bh_journal_access(handle, et->et_ci, |
2698 | left_path, i); | 2698 | left_path, i); |
2699 | if (ret) { | 2699 | if (ret) { |
2700 | mlog_errno(ret); | 2700 | mlog_errno(ret); |
@@ -2944,9 +2944,9 @@ static int __ocfs2_rotate_tree_left(struct inode *inode, | |||
2944 | goto out; | 2944 | goto out; |
2945 | } | 2945 | } |
2946 | 2946 | ||
2947 | ret = ocfs2_rotate_subtree_left(inode, handle, left_path, | 2947 | ret = ocfs2_rotate_subtree_left(handle, et, left_path, |
2948 | right_path, subtree_root, | 2948 | right_path, subtree_root, |
2949 | dealloc, &deleted, et); | 2949 | dealloc, &deleted); |
2950 | if (ret == -EAGAIN) { | 2950 | if (ret == -EAGAIN) { |
2951 | /* | 2951 | /* |
2952 | * The rotation has to temporarily stop due to | 2952 | * The rotation has to temporarily stop due to |