diff options
Diffstat (limited to 'fs/ocfs2/alloc.c')
-rw-r--r-- | fs/ocfs2/alloc.c | 103 |
1 files changed, 52 insertions, 51 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index d5dffcfa192a..616afa9f7bd1 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -415,11 +415,11 @@ static inline void ocfs2_et_update_clusters(struct inode *inode, | |||
415 | } | 415 | } |
416 | 416 | ||
417 | static inline int ocfs2_et_root_journal_access(handle_t *handle, | 417 | static inline int ocfs2_et_root_journal_access(handle_t *handle, |
418 | struct inode *inode, | 418 | struct ocfs2_caching_info *ci, |
419 | struct ocfs2_extent_tree *et, | 419 | struct ocfs2_extent_tree *et, |
420 | int type) | 420 | int type) |
421 | { | 421 | { |
422 | return et->et_root_journal_access(handle, inode, et->et_root_bh, | 422 | return et->et_root_journal_access(handle, ci, et->et_root_bh, |
423 | type); | 423 | type); |
424 | } | 424 | } |
425 | 425 | ||
@@ -633,7 +633,7 @@ static struct ocfs2_path *ocfs2_new_path_from_et(struct ocfs2_extent_tree *et) | |||
633 | * ocfs2_journal_access_path(), but I don't have a better one. | 633 | * ocfs2_journal_access_path(), but I don't have a better one. |
634 | */ | 634 | */ |
635 | static int ocfs2_path_bh_journal_access(handle_t *handle, | 635 | static int ocfs2_path_bh_journal_access(handle_t *handle, |
636 | struct inode *inode, | 636 | struct ocfs2_caching_info *ci, |
637 | struct ocfs2_path *path, | 637 | struct ocfs2_path *path, |
638 | int idx) | 638 | int idx) |
639 | { | 639 | { |
@@ -645,14 +645,15 @@ static int ocfs2_path_bh_journal_access(handle_t *handle, | |||
645 | if (idx) | 645 | if (idx) |
646 | access = ocfs2_journal_access_eb; | 646 | access = ocfs2_journal_access_eb; |
647 | 647 | ||
648 | return access(handle, inode, path->p_node[idx].bh, | 648 | return access(handle, ci, path->p_node[idx].bh, |
649 | OCFS2_JOURNAL_ACCESS_WRITE); | 649 | OCFS2_JOURNAL_ACCESS_WRITE); |
650 | } | 650 | } |
651 | 651 | ||
652 | /* | 652 | /* |
653 | * Convenience function to journal all components in a path. | 653 | * Convenience function to journal all components in a path. |
654 | */ | 654 | */ |
655 | static int ocfs2_journal_access_path(struct inode *inode, handle_t *handle, | 655 | static int ocfs2_journal_access_path(struct ocfs2_caching_info *ci, |
656 | handle_t *handle, | ||
656 | struct ocfs2_path *path) | 657 | struct ocfs2_path *path) |
657 | { | 658 | { |
658 | int i, ret = 0; | 659 | int i, ret = 0; |
@@ -661,7 +662,7 @@ static int ocfs2_journal_access_path(struct inode *inode, handle_t *handle, | |||
661 | goto out; | 662 | goto out; |
662 | 663 | ||
663 | for(i = 0; i < path_num_items(path); i++) { | 664 | for(i = 0; i < path_num_items(path); i++) { |
664 | ret = ocfs2_path_bh_journal_access(handle, inode, path, i); | 665 | ret = ocfs2_path_bh_journal_access(handle, ci, path, i); |
665 | if (ret < 0) { | 666 | if (ret < 0) { |
666 | mlog_errno(ret); | 667 | mlog_errno(ret); |
667 | goto out; | 668 | goto out; |
@@ -952,7 +953,7 @@ static int ocfs2_create_new_meta_bhs(struct ocfs2_super *osb, | |||
952 | ocfs2_set_new_buffer_uptodate(INODE_CACHE(inode), | 953 | ocfs2_set_new_buffer_uptodate(INODE_CACHE(inode), |
953 | bhs[i]); | 954 | bhs[i]); |
954 | 955 | ||
955 | status = ocfs2_journal_access_eb(handle, inode, bhs[i], | 956 | status = ocfs2_journal_access_eb(handle, INODE_CACHE(inode), bhs[i], |
956 | OCFS2_JOURNAL_ACCESS_CREATE); | 957 | OCFS2_JOURNAL_ACCESS_CREATE); |
957 | if (status < 0) { | 958 | if (status < 0) { |
958 | mlog_errno(status); | 959 | mlog_errno(status); |
@@ -1051,7 +1052,7 @@ static int ocfs2_adjust_rightmost_branch(handle_t *handle, | |||
1051 | goto out; | 1052 | goto out; |
1052 | } | 1053 | } |
1053 | 1054 | ||
1054 | status = ocfs2_journal_access_path(inode, handle, path); | 1055 | status = ocfs2_journal_access_path(INODE_CACHE(inode), handle, path); |
1055 | if (status < 0) { | 1056 | if (status < 0) { |
1056 | mlog_errno(status); | 1057 | mlog_errno(status); |
1057 | goto out; | 1058 | goto out; |
@@ -1162,7 +1163,7 @@ static int ocfs2_add_branch(struct ocfs2_super *osb, | |||
1162 | BUG_ON(!OCFS2_IS_VALID_EXTENT_BLOCK(eb)); | 1163 | BUG_ON(!OCFS2_IS_VALID_EXTENT_BLOCK(eb)); |
1163 | eb_el = &eb->h_list; | 1164 | eb_el = &eb->h_list; |
1164 | 1165 | ||
1165 | status = ocfs2_journal_access_eb(handle, inode, bh, | 1166 | status = ocfs2_journal_access_eb(handle, INODE_CACHE(inode), bh, |
1166 | OCFS2_JOURNAL_ACCESS_CREATE); | 1167 | OCFS2_JOURNAL_ACCESS_CREATE); |
1167 | if (status < 0) { | 1168 | if (status < 0) { |
1168 | mlog_errno(status); | 1169 | mlog_errno(status); |
@@ -1202,20 +1203,20 @@ static int ocfs2_add_branch(struct ocfs2_super *osb, | |||
1202 | * journal_dirty erroring as it won't unless we've aborted the | 1203 | * journal_dirty erroring as it won't unless we've aborted the |
1203 | * handle (in which case we would never be here) so reserving | 1204 | * handle (in which case we would never be here) so reserving |
1204 | * the write with journal_access is all we need to do. */ | 1205 | * the write with journal_access is all we need to do. */ |
1205 | status = ocfs2_journal_access_eb(handle, inode, *last_eb_bh, | 1206 | status = ocfs2_journal_access_eb(handle, INODE_CACHE(inode), *last_eb_bh, |
1206 | OCFS2_JOURNAL_ACCESS_WRITE); | 1207 | OCFS2_JOURNAL_ACCESS_WRITE); |
1207 | if (status < 0) { | 1208 | if (status < 0) { |
1208 | mlog_errno(status); | 1209 | mlog_errno(status); |
1209 | goto bail; | 1210 | goto bail; |
1210 | } | 1211 | } |
1211 | status = ocfs2_et_root_journal_access(handle, inode, et, | 1212 | status = ocfs2_et_root_journal_access(handle, INODE_CACHE(inode), et, |
1212 | OCFS2_JOURNAL_ACCESS_WRITE); | 1213 | OCFS2_JOURNAL_ACCESS_WRITE); |
1213 | if (status < 0) { | 1214 | if (status < 0) { |
1214 | mlog_errno(status); | 1215 | mlog_errno(status); |
1215 | goto bail; | 1216 | goto bail; |
1216 | } | 1217 | } |
1217 | if (eb_bh) { | 1218 | if (eb_bh) { |
1218 | status = ocfs2_journal_access_eb(handle, inode, eb_bh, | 1219 | status = ocfs2_journal_access_eb(handle, INODE_CACHE(inode), eb_bh, |
1219 | OCFS2_JOURNAL_ACCESS_WRITE); | 1220 | OCFS2_JOURNAL_ACCESS_WRITE); |
1220 | if (status < 0) { | 1221 | if (status < 0) { |
1221 | mlog_errno(status); | 1222 | mlog_errno(status); |
@@ -1305,7 +1306,7 @@ static int ocfs2_shift_tree_depth(struct ocfs2_super *osb, | |||
1305 | eb_el = &eb->h_list; | 1306 | eb_el = &eb->h_list; |
1306 | root_el = et->et_root_el; | 1307 | root_el = et->et_root_el; |
1307 | 1308 | ||
1308 | status = ocfs2_journal_access_eb(handle, inode, new_eb_bh, | 1309 | status = ocfs2_journal_access_eb(handle, INODE_CACHE(inode), new_eb_bh, |
1309 | OCFS2_JOURNAL_ACCESS_CREATE); | 1310 | OCFS2_JOURNAL_ACCESS_CREATE); |
1310 | if (status < 0) { | 1311 | if (status < 0) { |
1311 | mlog_errno(status); | 1312 | mlog_errno(status); |
@@ -1324,7 +1325,7 @@ static int ocfs2_shift_tree_depth(struct ocfs2_super *osb, | |||
1324 | goto bail; | 1325 | goto bail; |
1325 | } | 1326 | } |
1326 | 1327 | ||
1327 | status = ocfs2_et_root_journal_access(handle, inode, et, | 1328 | status = ocfs2_et_root_journal_access(handle, INODE_CACHE(inode), et, |
1328 | OCFS2_JOURNAL_ACCESS_WRITE); | 1329 | OCFS2_JOURNAL_ACCESS_WRITE); |
1329 | if (status < 0) { | 1330 | if (status < 0) { |
1330 | mlog_errno(status); | 1331 | mlog_errno(status); |
@@ -2095,7 +2096,7 @@ static int ocfs2_rotate_subtree_right(struct inode *inode, | |||
2095 | root_bh = left_path->p_node[subtree_index].bh; | 2096 | root_bh = left_path->p_node[subtree_index].bh; |
2096 | BUG_ON(root_bh != right_path->p_node[subtree_index].bh); | 2097 | BUG_ON(root_bh != right_path->p_node[subtree_index].bh); |
2097 | 2098 | ||
2098 | ret = ocfs2_path_bh_journal_access(handle, inode, right_path, | 2099 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), right_path, |
2099 | subtree_index); | 2100 | subtree_index); |
2100 | if (ret) { | 2101 | if (ret) { |
2101 | mlog_errno(ret); | 2102 | mlog_errno(ret); |
@@ -2103,14 +2104,14 @@ static int ocfs2_rotate_subtree_right(struct inode *inode, | |||
2103 | } | 2104 | } |
2104 | 2105 | ||
2105 | for(i = subtree_index + 1; i < path_num_items(right_path); i++) { | 2106 | for(i = subtree_index + 1; i < path_num_items(right_path); i++) { |
2106 | ret = ocfs2_path_bh_journal_access(handle, inode, | 2107 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), |
2107 | right_path, i); | 2108 | right_path, i); |
2108 | if (ret) { | 2109 | if (ret) { |
2109 | mlog_errno(ret); | 2110 | mlog_errno(ret); |
2110 | goto out; | 2111 | goto out; |
2111 | } | 2112 | } |
2112 | 2113 | ||
2113 | ret = ocfs2_path_bh_journal_access(handle, inode, | 2114 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), |
2114 | left_path, i); | 2115 | left_path, i); |
2115 | if (ret) { | 2116 | if (ret) { |
2116 | mlog_errno(ret); | 2117 | mlog_errno(ret); |
@@ -2503,7 +2504,7 @@ static int ocfs2_update_edge_lengths(struct inode *inode, handle_t *handle, | |||
2503 | goto out; | 2504 | goto out; |
2504 | } | 2505 | } |
2505 | 2506 | ||
2506 | ret = ocfs2_journal_access_path(inode, handle, path); | 2507 | ret = ocfs2_journal_access_path(INODE_CACHE(inode), handle, path); |
2507 | if (ret) { | 2508 | if (ret) { |
2508 | mlog_errno(ret); | 2509 | mlog_errno(ret); |
2509 | goto out; | 2510 | goto out; |
@@ -2654,7 +2655,7 @@ static int ocfs2_rotate_subtree_left(struct inode *inode, handle_t *handle, | |||
2654 | return -EAGAIN; | 2655 | return -EAGAIN; |
2655 | 2656 | ||
2656 | if (le16_to_cpu(right_leaf_el->l_next_free_rec) > 1) { | 2657 | if (le16_to_cpu(right_leaf_el->l_next_free_rec) > 1) { |
2657 | ret = ocfs2_journal_access_eb(handle, inode, | 2658 | ret = ocfs2_journal_access_eb(handle, INODE_CACHE(inode), |
2658 | path_leaf_bh(right_path), | 2659 | path_leaf_bh(right_path), |
2659 | OCFS2_JOURNAL_ACCESS_WRITE); | 2660 | OCFS2_JOURNAL_ACCESS_WRITE); |
2660 | if (ret) { | 2661 | if (ret) { |
@@ -2673,7 +2674,7 @@ static int ocfs2_rotate_subtree_left(struct inode *inode, handle_t *handle, | |||
2673 | * We have to update i_last_eb_blk during the meta | 2674 | * We have to update i_last_eb_blk during the meta |
2674 | * data delete. | 2675 | * data delete. |
2675 | */ | 2676 | */ |
2676 | ret = ocfs2_et_root_journal_access(handle, inode, et, | 2677 | ret = ocfs2_et_root_journal_access(handle, INODE_CACHE(inode), et, |
2677 | OCFS2_JOURNAL_ACCESS_WRITE); | 2678 | OCFS2_JOURNAL_ACCESS_WRITE); |
2678 | if (ret) { | 2679 | if (ret) { |
2679 | mlog_errno(ret); | 2680 | mlog_errno(ret); |
@@ -2689,7 +2690,7 @@ static int ocfs2_rotate_subtree_left(struct inode *inode, handle_t *handle, | |||
2689 | */ | 2690 | */ |
2690 | BUG_ON(right_has_empty && !del_right_subtree); | 2691 | BUG_ON(right_has_empty && !del_right_subtree); |
2691 | 2692 | ||
2692 | ret = ocfs2_path_bh_journal_access(handle, inode, right_path, | 2693 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), right_path, |
2693 | subtree_index); | 2694 | subtree_index); |
2694 | if (ret) { | 2695 | if (ret) { |
2695 | mlog_errno(ret); | 2696 | mlog_errno(ret); |
@@ -2697,14 +2698,14 @@ static int ocfs2_rotate_subtree_left(struct inode *inode, handle_t *handle, | |||
2697 | } | 2698 | } |
2698 | 2699 | ||
2699 | for(i = subtree_index + 1; i < path_num_items(right_path); i++) { | 2700 | for(i = subtree_index + 1; i < path_num_items(right_path); i++) { |
2700 | ret = ocfs2_path_bh_journal_access(handle, inode, | 2701 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), |
2701 | right_path, i); | 2702 | right_path, i); |
2702 | if (ret) { | 2703 | if (ret) { |
2703 | mlog_errno(ret); | 2704 | mlog_errno(ret); |
2704 | goto out; | 2705 | goto out; |
2705 | } | 2706 | } |
2706 | 2707 | ||
2707 | ret = ocfs2_path_bh_journal_access(handle, inode, | 2708 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), |
2708 | left_path, i); | 2709 | left_path, i); |
2709 | if (ret) { | 2710 | if (ret) { |
2710 | mlog_errno(ret); | 2711 | mlog_errno(ret); |
@@ -2864,7 +2865,7 @@ static int ocfs2_rotate_rightmost_leaf_left(struct inode *inode, | |||
2864 | if (!ocfs2_is_empty_extent(&el->l_recs[0])) | 2865 | if (!ocfs2_is_empty_extent(&el->l_recs[0])) |
2865 | return 0; | 2866 | return 0; |
2866 | 2867 | ||
2867 | ret = ocfs2_path_bh_journal_access(handle, inode, path, | 2868 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), path, |
2868 | path_num_items(path) - 1); | 2869 | path_num_items(path) - 1); |
2869 | if (ret) { | 2870 | if (ret) { |
2870 | mlog_errno(ret); | 2871 | mlog_errno(ret); |
@@ -2947,7 +2948,7 @@ static int __ocfs2_rotate_tree_left(struct inode *inode, | |||
2947 | * Caller might still want to make changes to the | 2948 | * Caller might still want to make changes to the |
2948 | * tree root, so re-add it to the journal here. | 2949 | * tree root, so re-add it to the journal here. |
2949 | */ | 2950 | */ |
2950 | ret = ocfs2_path_bh_journal_access(handle, inode, | 2951 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), |
2951 | left_path, 0); | 2952 | left_path, 0); |
2952 | if (ret) { | 2953 | if (ret) { |
2953 | mlog_errno(ret); | 2954 | mlog_errno(ret); |
@@ -3025,7 +3026,7 @@ static int ocfs2_remove_rightmost_path(struct inode *inode, handle_t *handle, | |||
3025 | goto out; | 3026 | goto out; |
3026 | } | 3027 | } |
3027 | 3028 | ||
3028 | ret = ocfs2_journal_access_path(inode, handle, path); | 3029 | ret = ocfs2_journal_access_path(INODE_CACHE(inode), handle, path); |
3029 | if (ret) { | 3030 | if (ret) { |
3030 | mlog_errno(ret); | 3031 | mlog_errno(ret); |
3031 | goto out; | 3032 | goto out; |
@@ -3055,7 +3056,7 @@ static int ocfs2_remove_rightmost_path(struct inode *inode, handle_t *handle, | |||
3055 | goto out; | 3056 | goto out; |
3056 | } | 3057 | } |
3057 | 3058 | ||
3058 | ret = ocfs2_journal_access_path(inode, handle, left_path); | 3059 | ret = ocfs2_journal_access_path(INODE_CACHE(inode), handle, left_path); |
3059 | if (ret) { | 3060 | if (ret) { |
3060 | mlog_errno(ret); | 3061 | mlog_errno(ret); |
3061 | goto out; | 3062 | goto out; |
@@ -3370,7 +3371,7 @@ static int ocfs2_merge_rec_right(struct inode *inode, | |||
3370 | root_bh = left_path->p_node[subtree_index].bh; | 3371 | root_bh = left_path->p_node[subtree_index].bh; |
3371 | BUG_ON(root_bh != right_path->p_node[subtree_index].bh); | 3372 | BUG_ON(root_bh != right_path->p_node[subtree_index].bh); |
3372 | 3373 | ||
3373 | ret = ocfs2_path_bh_journal_access(handle, inode, right_path, | 3374 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), right_path, |
3374 | subtree_index); | 3375 | subtree_index); |
3375 | if (ret) { | 3376 | if (ret) { |
3376 | mlog_errno(ret); | 3377 | mlog_errno(ret); |
@@ -3379,14 +3380,14 @@ static int ocfs2_merge_rec_right(struct inode *inode, | |||
3379 | 3380 | ||
3380 | for (i = subtree_index + 1; | 3381 | for (i = subtree_index + 1; |
3381 | i < path_num_items(right_path); i++) { | 3382 | i < path_num_items(right_path); i++) { |
3382 | ret = ocfs2_path_bh_journal_access(handle, inode, | 3383 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), |
3383 | right_path, i); | 3384 | right_path, i); |
3384 | if (ret) { | 3385 | if (ret) { |
3385 | mlog_errno(ret); | 3386 | mlog_errno(ret); |
3386 | goto out; | 3387 | goto out; |
3387 | } | 3388 | } |
3388 | 3389 | ||
3389 | ret = ocfs2_path_bh_journal_access(handle, inode, | 3390 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), |
3390 | left_path, i); | 3391 | left_path, i); |
3391 | if (ret) { | 3392 | if (ret) { |
3392 | mlog_errno(ret); | 3393 | mlog_errno(ret); |
@@ -3399,7 +3400,7 @@ static int ocfs2_merge_rec_right(struct inode *inode, | |||
3399 | right_rec = &el->l_recs[index + 1]; | 3400 | right_rec = &el->l_recs[index + 1]; |
3400 | } | 3401 | } |
3401 | 3402 | ||
3402 | ret = ocfs2_path_bh_journal_access(handle, inode, left_path, | 3403 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), left_path, |
3403 | path_num_items(left_path) - 1); | 3404 | path_num_items(left_path) - 1); |
3404 | if (ret) { | 3405 | if (ret) { |
3405 | mlog_errno(ret); | 3406 | mlog_errno(ret); |
@@ -3539,7 +3540,7 @@ static int ocfs2_merge_rec_left(struct inode *inode, | |||
3539 | root_bh = left_path->p_node[subtree_index].bh; | 3540 | root_bh = left_path->p_node[subtree_index].bh; |
3540 | BUG_ON(root_bh != right_path->p_node[subtree_index].bh); | 3541 | BUG_ON(root_bh != right_path->p_node[subtree_index].bh); |
3541 | 3542 | ||
3542 | ret = ocfs2_path_bh_journal_access(handle, inode, right_path, | 3543 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), right_path, |
3543 | subtree_index); | 3544 | subtree_index); |
3544 | if (ret) { | 3545 | if (ret) { |
3545 | mlog_errno(ret); | 3546 | mlog_errno(ret); |
@@ -3548,14 +3549,14 @@ static int ocfs2_merge_rec_left(struct inode *inode, | |||
3548 | 3549 | ||
3549 | for (i = subtree_index + 1; | 3550 | for (i = subtree_index + 1; |
3550 | i < path_num_items(right_path); i++) { | 3551 | i < path_num_items(right_path); i++) { |
3551 | ret = ocfs2_path_bh_journal_access(handle, inode, | 3552 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), |
3552 | right_path, i); | 3553 | right_path, i); |
3553 | if (ret) { | 3554 | if (ret) { |
3554 | mlog_errno(ret); | 3555 | mlog_errno(ret); |
3555 | goto out; | 3556 | goto out; |
3556 | } | 3557 | } |
3557 | 3558 | ||
3558 | ret = ocfs2_path_bh_journal_access(handle, inode, | 3559 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), |
3559 | left_path, i); | 3560 | left_path, i); |
3560 | if (ret) { | 3561 | if (ret) { |
3561 | mlog_errno(ret); | 3562 | mlog_errno(ret); |
@@ -3568,7 +3569,7 @@ static int ocfs2_merge_rec_left(struct inode *inode, | |||
3568 | has_empty_extent = 1; | 3569 | has_empty_extent = 1; |
3569 | } | 3570 | } |
3570 | 3571 | ||
3571 | ret = ocfs2_path_bh_journal_access(handle, inode, right_path, | 3572 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), right_path, |
3572 | path_num_items(right_path) - 1); | 3573 | path_num_items(right_path) - 1); |
3573 | if (ret) { | 3574 | if (ret) { |
3574 | mlog_errno(ret); | 3575 | mlog_errno(ret); |
@@ -4006,7 +4007,7 @@ static int ocfs2_append_rec_to_path(struct inode *inode, handle_t *handle, | |||
4006 | } | 4007 | } |
4007 | } | 4008 | } |
4008 | 4009 | ||
4009 | ret = ocfs2_journal_access_path(inode, handle, right_path); | 4010 | ret = ocfs2_journal_access_path(INODE_CACHE(inode), handle, right_path); |
4010 | if (ret) { | 4011 | if (ret) { |
4011 | mlog_errno(ret); | 4012 | mlog_errno(ret); |
4012 | goto out; | 4013 | goto out; |
@@ -4135,7 +4136,7 @@ static int ocfs2_insert_path(struct inode *inode, | |||
4135 | goto out; | 4136 | goto out; |
4136 | } | 4137 | } |
4137 | 4138 | ||
4138 | ret = ocfs2_journal_access_path(inode, handle, left_path); | 4139 | ret = ocfs2_journal_access_path(INODE_CACHE(inode), handle, left_path); |
4139 | if (ret < 0) { | 4140 | if (ret < 0) { |
4140 | mlog_errno(ret); | 4141 | mlog_errno(ret); |
4141 | goto out; | 4142 | goto out; |
@@ -4146,7 +4147,7 @@ static int ocfs2_insert_path(struct inode *inode, | |||
4146 | * Pass both paths to the journal. The majority of inserts | 4147 | * Pass both paths to the journal. The majority of inserts |
4147 | * will be touching all components anyway. | 4148 | * will be touching all components anyway. |
4148 | */ | 4149 | */ |
4149 | ret = ocfs2_journal_access_path(inode, handle, right_path); | 4150 | ret = ocfs2_journal_access_path(INODE_CACHE(inode), handle, right_path); |
4150 | if (ret < 0) { | 4151 | if (ret < 0) { |
4151 | mlog_errno(ret); | 4152 | mlog_errno(ret); |
4152 | goto out; | 4153 | goto out; |
@@ -4211,7 +4212,7 @@ static int ocfs2_do_insert_extent(struct inode *inode, | |||
4211 | 4212 | ||
4212 | el = et->et_root_el; | 4213 | el = et->et_root_el; |
4213 | 4214 | ||
4214 | ret = ocfs2_et_root_journal_access(handle, inode, et, | 4215 | ret = ocfs2_et_root_journal_access(handle, INODE_CACHE(inode), et, |
4215 | OCFS2_JOURNAL_ACCESS_WRITE); | 4216 | OCFS2_JOURNAL_ACCESS_WRITE); |
4216 | if (ret) { | 4217 | if (ret) { |
4217 | mlog_errno(ret); | 4218 | mlog_errno(ret); |
@@ -4273,7 +4274,7 @@ static int ocfs2_do_insert_extent(struct inode *inode, | |||
4273 | * ocfs2_rotate_tree_right() might have extended the | 4274 | * ocfs2_rotate_tree_right() might have extended the |
4274 | * transaction without re-journaling our tree root. | 4275 | * transaction without re-journaling our tree root. |
4275 | */ | 4276 | */ |
4276 | ret = ocfs2_et_root_journal_access(handle, inode, et, | 4277 | ret = ocfs2_et_root_journal_access(handle, INODE_CACHE(inode), et, |
4277 | OCFS2_JOURNAL_ACCESS_WRITE); | 4278 | OCFS2_JOURNAL_ACCESS_WRITE); |
4278 | if (ret) { | 4279 | if (ret) { |
4279 | mlog_errno(ret); | 4280 | mlog_errno(ret); |
@@ -4796,7 +4797,7 @@ int ocfs2_add_clusters_in_btree(struct ocfs2_super *osb, | |||
4796 | BUG_ON(num_bits > clusters_to_add); | 4797 | BUG_ON(num_bits > clusters_to_add); |
4797 | 4798 | ||
4798 | /* reserve our write early -- insert_extent may update the tree root */ | 4799 | /* reserve our write early -- insert_extent may update the tree root */ |
4799 | status = ocfs2_et_root_journal_access(handle, inode, et, | 4800 | status = ocfs2_et_root_journal_access(handle, INODE_CACHE(inode), et, |
4800 | OCFS2_JOURNAL_ACCESS_WRITE); | 4801 | OCFS2_JOURNAL_ACCESS_WRITE); |
4801 | if (status < 0) { | 4802 | if (status < 0) { |
4802 | mlog_errno(status); | 4803 | mlog_errno(status); |
@@ -4971,7 +4972,7 @@ static int ocfs2_replace_extent_rec(struct inode *inode, | |||
4971 | { | 4972 | { |
4972 | int ret; | 4973 | int ret; |
4973 | 4974 | ||
4974 | ret = ocfs2_path_bh_journal_access(handle, inode, path, | 4975 | ret = ocfs2_path_bh_journal_access(handle, INODE_CACHE(inode), path, |
4975 | path_num_items(path) - 1); | 4976 | path_num_items(path) - 1); |
4976 | if (ret) { | 4977 | if (ret) { |
4977 | mlog_errno(ret); | 4978 | mlog_errno(ret); |
@@ -5333,13 +5334,13 @@ static int ocfs2_truncate_rec(struct inode *inode, handle_t *handle, | |||
5333 | goto out; | 5334 | goto out; |
5334 | } | 5335 | } |
5335 | 5336 | ||
5336 | ret = ocfs2_journal_access_path(inode, handle, path); | 5337 | ret = ocfs2_journal_access_path(INODE_CACHE(inode), handle, path); |
5337 | if (ret) { | 5338 | if (ret) { |
5338 | mlog_errno(ret); | 5339 | mlog_errno(ret); |
5339 | goto out; | 5340 | goto out; |
5340 | } | 5341 | } |
5341 | 5342 | ||
5342 | ret = ocfs2_journal_access_path(inode, handle, left_path); | 5343 | ret = ocfs2_journal_access_path(INODE_CACHE(inode), handle, left_path); |
5343 | if (ret) { | 5344 | if (ret) { |
5344 | mlog_errno(ret); | 5345 | mlog_errno(ret); |
5345 | goto out; | 5346 | goto out; |
@@ -5574,7 +5575,7 @@ int ocfs2_remove_btree_range(struct inode *inode, | |||
5574 | goto out; | 5575 | goto out; |
5575 | } | 5576 | } |
5576 | 5577 | ||
5577 | ret = ocfs2_et_root_journal_access(handle, inode, et, | 5578 | ret = ocfs2_et_root_journal_access(handle, INODE_CACHE(inode), et, |
5578 | OCFS2_JOURNAL_ACCESS_WRITE); | 5579 | OCFS2_JOURNAL_ACCESS_WRITE); |
5579 | if (ret) { | 5580 | if (ret) { |
5580 | mlog_errno(ret); | 5581 | mlog_errno(ret); |
@@ -5691,7 +5692,7 @@ int ocfs2_truncate_log_append(struct ocfs2_super *osb, | |||
5691 | goto bail; | 5692 | goto bail; |
5692 | } | 5693 | } |
5693 | 5694 | ||
5694 | status = ocfs2_journal_access_di(handle, tl_inode, tl_bh, | 5695 | status = ocfs2_journal_access_di(handle, INODE_CACHE(tl_inode), tl_bh, |
5695 | OCFS2_JOURNAL_ACCESS_WRITE); | 5696 | OCFS2_JOURNAL_ACCESS_WRITE); |
5696 | if (status < 0) { | 5697 | if (status < 0) { |
5697 | mlog_errno(status); | 5698 | mlog_errno(status); |
@@ -5753,7 +5754,7 @@ static int ocfs2_replay_truncate_records(struct ocfs2_super *osb, | |||
5753 | while (i >= 0) { | 5754 | while (i >= 0) { |
5754 | /* Caller has given us at least enough credits to | 5755 | /* Caller has given us at least enough credits to |
5755 | * update the truncate log dinode */ | 5756 | * update the truncate log dinode */ |
5756 | status = ocfs2_journal_access_di(handle, tl_inode, tl_bh, | 5757 | status = ocfs2_journal_access_di(handle, INODE_CACHE(tl_inode), tl_bh, |
5757 | OCFS2_JOURNAL_ACCESS_WRITE); | 5758 | OCFS2_JOURNAL_ACCESS_WRITE); |
5758 | if (status < 0) { | 5759 | if (status < 0) { |
5759 | mlog_errno(status); | 5760 | mlog_errno(status); |
@@ -6770,14 +6771,14 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb, | |||
6770 | * Each component will be touched, so we might as well journal | 6771 | * Each component will be touched, so we might as well journal |
6771 | * here to avoid having to handle errors later. | 6772 | * here to avoid having to handle errors later. |
6772 | */ | 6773 | */ |
6773 | status = ocfs2_journal_access_path(inode, handle, path); | 6774 | status = ocfs2_journal_access_path(INODE_CACHE(inode), handle, path); |
6774 | if (status < 0) { | 6775 | if (status < 0) { |
6775 | mlog_errno(status); | 6776 | mlog_errno(status); |
6776 | goto bail; | 6777 | goto bail; |
6777 | } | 6778 | } |
6778 | 6779 | ||
6779 | if (last_eb_bh) { | 6780 | if (last_eb_bh) { |
6780 | status = ocfs2_journal_access_eb(handle, inode, last_eb_bh, | 6781 | status = ocfs2_journal_access_eb(handle, INODE_CACHE(inode), last_eb_bh, |
6781 | OCFS2_JOURNAL_ACCESS_WRITE); | 6782 | OCFS2_JOURNAL_ACCESS_WRITE); |
6782 | if (status < 0) { | 6783 | if (status < 0) { |
6783 | mlog_errno(status); | 6784 | mlog_errno(status); |
@@ -7139,7 +7140,7 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode, | |||
7139 | goto out_unlock; | 7140 | goto out_unlock; |
7140 | } | 7141 | } |
7141 | 7142 | ||
7142 | ret = ocfs2_journal_access_di(handle, inode, di_bh, | 7143 | ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, |
7143 | OCFS2_JOURNAL_ACCESS_WRITE); | 7144 | OCFS2_JOURNAL_ACCESS_WRITE); |
7144 | if (ret) { | 7145 | if (ret) { |
7145 | mlog_errno(ret); | 7146 | mlog_errno(ret); |
@@ -7508,7 +7509,7 @@ int ocfs2_truncate_inline(struct inode *inode, struct buffer_head *di_bh, | |||
7508 | goto out; | 7509 | goto out; |
7509 | } | 7510 | } |
7510 | 7511 | ||
7511 | ret = ocfs2_journal_access_di(handle, inode, di_bh, | 7512 | ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, |
7512 | OCFS2_JOURNAL_ACCESS_WRITE); | 7513 | OCFS2_JOURNAL_ACCESS_WRITE); |
7513 | if (ret) { | 7514 | if (ret) { |
7514 | mlog_errno(ret); | 7515 | mlog_errno(ret); |