aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2009-02-12 22:47:43 -0500
committerJoel Becker <joel.becker@oracle.com>2009-09-04 19:07:59 -0400
commite46f74dc357947e2aed9bdd63cf335c5fd23810b (patch)
tree2223c4659223d10415a72760a80981e4f784a235 /fs/ocfs2
parent1e2dd63fe0b6e99b81904a61090db801978b9520 (diff)
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: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/alloc.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index b358d567313e..12dbd6ee6faf 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -2871,24 +2871,24 @@ out:
2871 return ret; 2871 return ret;
2872} 2872}
2873 2873
2874static int __ocfs2_rotate_tree_left(struct inode *inode, 2874static int __ocfs2_rotate_tree_left(handle_t *handle,
2875 handle_t *handle, int orig_credits, 2875 struct ocfs2_extent_tree *et,
2876 int orig_credits,
2876 struct ocfs2_path *path, 2877 struct ocfs2_path *path,
2877 struct ocfs2_cached_dealloc_ctxt *dealloc, 2878 struct ocfs2_cached_dealloc_ctxt *dealloc,
2878 struct ocfs2_path **empty_extent_path, 2879 struct ocfs2_path **empty_extent_path)
2879 struct ocfs2_extent_tree *et)
2880{ 2880{
2881 int ret, subtree_root, deleted; 2881 int ret, subtree_root, deleted;
2882 u32 right_cpos; 2882 u32 right_cpos;
2883 struct ocfs2_path *left_path = NULL; 2883 struct ocfs2_path *left_path = NULL;
2884 struct ocfs2_path *right_path = NULL; 2884 struct ocfs2_path *right_path = NULL;
2885 struct super_block *sb = ocfs2_metadata_cache_get_super(et->et_ci);
2885 2886
2886 BUG_ON(!ocfs2_is_empty_extent(&(path_leaf_el(path)->l_recs[0]))); 2887 BUG_ON(!ocfs2_is_empty_extent(&(path_leaf_el(path)->l_recs[0])));
2887 2888
2888 *empty_extent_path = NULL; 2889 *empty_extent_path = NULL;
2889 2890
2890 ret = ocfs2_find_cpos_for_right_leaf(inode->i_sb, path, 2891 ret = ocfs2_find_cpos_for_right_leaf(sb, path, &right_cpos);
2891 &right_cpos);
2892 if (ret) { 2892 if (ret) {
2893 mlog_errno(ret); 2893 mlog_errno(ret);
2894 goto out; 2894 goto out;
@@ -2937,7 +2937,7 @@ static int __ocfs2_rotate_tree_left(struct inode *inode,
2937 * Caller might still want to make changes to the 2937 * Caller might still want to make changes to the
2938 * tree root, so re-add it to the journal here. 2938 * tree root, so re-add it to the journal here.
2939 */ 2939 */
2940 ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), 2940 ret = ocfs2_path_bh_journal_access(handle, et->et_ci,
2941 left_path, 0); 2941 left_path, 0);
2942 if (ret) { 2942 if (ret) {
2943 mlog_errno(ret); 2943 mlog_errno(ret);
@@ -2973,7 +2973,7 @@ static int __ocfs2_rotate_tree_left(struct inode *inode,
2973 2973
2974 ocfs2_mv_path(left_path, right_path); 2974 ocfs2_mv_path(left_path, right_path);
2975 2975
2976 ret = ocfs2_find_cpos_for_right_leaf(inode->i_sb, left_path, 2976 ret = ocfs2_find_cpos_for_right_leaf(sb, left_path,
2977 &right_cpos); 2977 &right_cpos);
2978 if (ret) { 2978 if (ret) {
2979 mlog_errno(ret); 2979 mlog_errno(ret);
@@ -3187,8 +3187,8 @@ rightmost_no_delete:
3187 * and restarting from there. 3187 * and restarting from there.
3188 */ 3188 */
3189try_rotate: 3189try_rotate:
3190 ret = __ocfs2_rotate_tree_left(inode, handle, orig_credits, path, 3190 ret = __ocfs2_rotate_tree_left(handle, et, orig_credits, path,
3191 dealloc, &restart_path, et); 3191 dealloc, &restart_path);
3192 if (ret && ret != -EAGAIN) { 3192 if (ret && ret != -EAGAIN) {
3193 mlog_errno(ret); 3193 mlog_errno(ret);
3194 goto out; 3194 goto out;
@@ -3198,9 +3198,9 @@ try_rotate:
3198 tmp_path = restart_path; 3198 tmp_path = restart_path;
3199 restart_path = NULL; 3199 restart_path = NULL;
3200 3200
3201 ret = __ocfs2_rotate_tree_left(inode, handle, orig_credits, 3201 ret = __ocfs2_rotate_tree_left(handle, et, orig_credits,
3202 tmp_path, dealloc, 3202 tmp_path, dealloc,
3203 &restart_path, et); 3203 &restart_path);
3204 if (ret && ret != -EAGAIN) { 3204 if (ret && ret != -EAGAIN) {
3205 mlog_errno(ret); 3205 mlog_errno(ret);
3206 goto out; 3206 goto out;