diff options
Diffstat (limited to 'fs/ocfs2/alloc.c')
-rw-r--r-- | fs/ocfs2/alloc.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index ad41eabd8b74..18762f5ebda8 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -2536,7 +2536,8 @@ out: | |||
2536 | return ret; | 2536 | return ret; |
2537 | } | 2537 | } |
2538 | 2538 | ||
2539 | static void ocfs2_unlink_path(struct inode *inode, handle_t *handle, | 2539 | static void ocfs2_unlink_path(handle_t *handle, |
2540 | struct ocfs2_extent_tree *et, | ||
2540 | struct ocfs2_cached_dealloc_ctxt *dealloc, | 2541 | struct ocfs2_cached_dealloc_ctxt *dealloc, |
2541 | struct ocfs2_path *path, int unlink_start) | 2542 | struct ocfs2_path *path, int unlink_start) |
2542 | { | 2543 | { |
@@ -2558,12 +2559,12 @@ static void ocfs2_unlink_path(struct inode *inode, handle_t *handle, | |||
2558 | mlog(ML_ERROR, | 2559 | mlog(ML_ERROR, |
2559 | "Inode %llu, attempted to remove extent block " | 2560 | "Inode %llu, attempted to remove extent block " |
2560 | "%llu with %u records\n", | 2561 | "%llu with %u records\n", |
2561 | (unsigned long long)OCFS2_I(inode)->ip_blkno, | 2562 | (unsigned long long)ocfs2_metadata_cache_owner(et->et_ci), |
2562 | (unsigned long long)le64_to_cpu(eb->h_blkno), | 2563 | (unsigned long long)le64_to_cpu(eb->h_blkno), |
2563 | le16_to_cpu(el->l_next_free_rec)); | 2564 | le16_to_cpu(el->l_next_free_rec)); |
2564 | 2565 | ||
2565 | ocfs2_journal_dirty(handle, bh); | 2566 | ocfs2_journal_dirty(handle, bh); |
2566 | ocfs2_remove_from_cache(INODE_CACHE(inode), bh); | 2567 | ocfs2_remove_from_cache(et->et_ci, bh); |
2567 | continue; | 2568 | continue; |
2568 | } | 2569 | } |
2569 | 2570 | ||
@@ -2576,11 +2577,12 @@ static void ocfs2_unlink_path(struct inode *inode, handle_t *handle, | |||
2576 | if (ret) | 2577 | if (ret) |
2577 | mlog_errno(ret); | 2578 | mlog_errno(ret); |
2578 | 2579 | ||
2579 | ocfs2_remove_from_cache(INODE_CACHE(inode), bh); | 2580 | ocfs2_remove_from_cache(et->et_ci, bh); |
2580 | } | 2581 | } |
2581 | } | 2582 | } |
2582 | 2583 | ||
2583 | static void ocfs2_unlink_subtree(struct inode *inode, handle_t *handle, | 2584 | static void ocfs2_unlink_subtree(handle_t *handle, |
2585 | struct ocfs2_extent_tree *et, | ||
2584 | struct ocfs2_path *left_path, | 2586 | struct ocfs2_path *left_path, |
2585 | struct ocfs2_path *right_path, | 2587 | struct ocfs2_path *right_path, |
2586 | int subtree_index, | 2588 | int subtree_index, |
@@ -2611,7 +2613,7 @@ static void ocfs2_unlink_subtree(struct inode *inode, handle_t *handle, | |||
2611 | ocfs2_journal_dirty(handle, root_bh); | 2613 | ocfs2_journal_dirty(handle, root_bh); |
2612 | ocfs2_journal_dirty(handle, path_leaf_bh(left_path)); | 2614 | ocfs2_journal_dirty(handle, path_leaf_bh(left_path)); |
2613 | 2615 | ||
2614 | ocfs2_unlink_path(inode, handle, dealloc, right_path, | 2616 | ocfs2_unlink_path(handle, et, dealloc, right_path, |
2615 | subtree_index + 1); | 2617 | subtree_index + 1); |
2616 | } | 2618 | } |
2617 | 2619 | ||
@@ -2744,7 +2746,7 @@ static int ocfs2_rotate_subtree_left(struct inode *inode, handle_t *handle, | |||
2744 | mlog_errno(ret); | 2746 | mlog_errno(ret); |
2745 | 2747 | ||
2746 | if (del_right_subtree) { | 2748 | if (del_right_subtree) { |
2747 | ocfs2_unlink_subtree(inode, handle, left_path, right_path, | 2749 | ocfs2_unlink_subtree(handle, et, left_path, right_path, |
2748 | subtree_index, dealloc); | 2750 | subtree_index, dealloc); |
2749 | ret = ocfs2_update_edge_lengths(inode, handle, subtree_index, | 2751 | ret = ocfs2_update_edge_lengths(inode, handle, subtree_index, |
2750 | left_path); | 2752 | left_path); |
@@ -3067,7 +3069,7 @@ static int ocfs2_remove_rightmost_path(struct inode *inode, handle_t *handle, | |||
3067 | 3069 | ||
3068 | subtree_index = ocfs2_find_subtree_root(inode, left_path, path); | 3070 | subtree_index = ocfs2_find_subtree_root(inode, left_path, path); |
3069 | 3071 | ||
3070 | ocfs2_unlink_subtree(inode, handle, left_path, path, | 3072 | ocfs2_unlink_subtree(handle, et, left_path, path, |
3071 | subtree_index, dealloc); | 3073 | subtree_index, dealloc); |
3072 | ret = ocfs2_update_edge_lengths(inode, handle, subtree_index, | 3074 | ret = ocfs2_update_edge_lengths(inode, handle, subtree_index, |
3073 | left_path); | 3075 | left_path); |
@@ -3086,7 +3088,7 @@ static int ocfs2_remove_rightmost_path(struct inode *inode, handle_t *handle, | |||
3086 | * revert the inode back to having extents | 3088 | * revert the inode back to having extents |
3087 | * in-line. | 3089 | * in-line. |
3088 | */ | 3090 | */ |
3089 | ocfs2_unlink_path(inode, handle, dealloc, path, 1); | 3091 | ocfs2_unlink_path(handle, et, dealloc, path, 1); |
3090 | 3092 | ||
3091 | el = et->et_root_el; | 3093 | el = et->et_root_el; |
3092 | el->l_tree_depth = 0; | 3094 | el->l_tree_depth = 0; |