diff options
Diffstat (limited to 'fs/ocfs2/suballoc.c')
-rw-r--r-- | fs/ocfs2/suballoc.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index 73a16d4666dc..c30b644d9572 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c | |||
@@ -310,7 +310,7 @@ int ocfs2_read_group_descriptor(struct inode *inode, struct ocfs2_dinode *di, | |||
310 | int rc; | 310 | int rc; |
311 | struct buffer_head *tmp = *bh; | 311 | struct buffer_head *tmp = *bh; |
312 | 312 | ||
313 | rc = ocfs2_read_block(inode, gd_blkno, &tmp, | 313 | rc = ocfs2_read_block(INODE_CACHE(inode), gd_blkno, &tmp, |
314 | ocfs2_validate_group_descriptor); | 314 | ocfs2_validate_group_descriptor); |
315 | if (rc) | 315 | if (rc) |
316 | goto out; | 316 | goto out; |
@@ -352,7 +352,7 @@ static int ocfs2_block_group_fill(handle_t *handle, | |||
352 | } | 352 | } |
353 | 353 | ||
354 | status = ocfs2_journal_access_gd(handle, | 354 | status = ocfs2_journal_access_gd(handle, |
355 | alloc_inode, | 355 | INODE_CACHE(alloc_inode), |
356 | bg_bh, | 356 | bg_bh, |
357 | OCFS2_JOURNAL_ACCESS_CREATE); | 357 | OCFS2_JOURNAL_ACCESS_CREATE); |
358 | if (status < 0) { | 358 | if (status < 0) { |
@@ -476,7 +476,7 @@ static int ocfs2_block_group_alloc(struct ocfs2_super *osb, | |||
476 | mlog_errno(status); | 476 | mlog_errno(status); |
477 | goto bail; | 477 | goto bail; |
478 | } | 478 | } |
479 | ocfs2_set_new_buffer_uptodate(alloc_inode, bg_bh); | 479 | ocfs2_set_new_buffer_uptodate(INODE_CACHE(alloc_inode), bg_bh); |
480 | 480 | ||
481 | status = ocfs2_block_group_fill(handle, | 481 | status = ocfs2_block_group_fill(handle, |
482 | alloc_inode, | 482 | alloc_inode, |
@@ -491,7 +491,7 @@ static int ocfs2_block_group_alloc(struct ocfs2_super *osb, | |||
491 | 491 | ||
492 | bg = (struct ocfs2_group_desc *) bg_bh->b_data; | 492 | bg = (struct ocfs2_group_desc *) bg_bh->b_data; |
493 | 493 | ||
494 | status = ocfs2_journal_access_di(handle, alloc_inode, | 494 | status = ocfs2_journal_access_di(handle, INODE_CACHE(alloc_inode), |
495 | bh, OCFS2_JOURNAL_ACCESS_WRITE); | 495 | bh, OCFS2_JOURNAL_ACCESS_WRITE); |
496 | if (status < 0) { | 496 | if (status < 0) { |
497 | mlog_errno(status); | 497 | mlog_errno(status); |
@@ -1033,7 +1033,7 @@ static inline int ocfs2_block_group_set_bits(handle_t *handle, | |||
1033 | journal_type = OCFS2_JOURNAL_ACCESS_UNDO; | 1033 | journal_type = OCFS2_JOURNAL_ACCESS_UNDO; |
1034 | 1034 | ||
1035 | status = ocfs2_journal_access_gd(handle, | 1035 | status = ocfs2_journal_access_gd(handle, |
1036 | alloc_inode, | 1036 | INODE_CACHE(alloc_inode), |
1037 | group_bh, | 1037 | group_bh, |
1038 | journal_type); | 1038 | journal_type); |
1039 | if (status < 0) { | 1039 | if (status < 0) { |
@@ -1106,7 +1106,8 @@ static int ocfs2_relink_block_group(handle_t *handle, | |||
1106 | bg_ptr = le64_to_cpu(bg->bg_next_group); | 1106 | bg_ptr = le64_to_cpu(bg->bg_next_group); |
1107 | prev_bg_ptr = le64_to_cpu(prev_bg->bg_next_group); | 1107 | prev_bg_ptr = le64_to_cpu(prev_bg->bg_next_group); |
1108 | 1108 | ||
1109 | status = ocfs2_journal_access_gd(handle, alloc_inode, prev_bg_bh, | 1109 | status = ocfs2_journal_access_gd(handle, INODE_CACHE(alloc_inode), |
1110 | prev_bg_bh, | ||
1110 | OCFS2_JOURNAL_ACCESS_WRITE); | 1111 | OCFS2_JOURNAL_ACCESS_WRITE); |
1111 | if (status < 0) { | 1112 | if (status < 0) { |
1112 | mlog_errno(status); | 1113 | mlog_errno(status); |
@@ -1121,8 +1122,8 @@ static int ocfs2_relink_block_group(handle_t *handle, | |||
1121 | goto out_rollback; | 1122 | goto out_rollback; |
1122 | } | 1123 | } |
1123 | 1124 | ||
1124 | status = ocfs2_journal_access_gd(handle, alloc_inode, bg_bh, | 1125 | status = ocfs2_journal_access_gd(handle, INODE_CACHE(alloc_inode), |
1125 | OCFS2_JOURNAL_ACCESS_WRITE); | 1126 | bg_bh, OCFS2_JOURNAL_ACCESS_WRITE); |
1126 | if (status < 0) { | 1127 | if (status < 0) { |
1127 | mlog_errno(status); | 1128 | mlog_errno(status); |
1128 | goto out_rollback; | 1129 | goto out_rollback; |
@@ -1136,8 +1137,8 @@ static int ocfs2_relink_block_group(handle_t *handle, | |||
1136 | goto out_rollback; | 1137 | goto out_rollback; |
1137 | } | 1138 | } |
1138 | 1139 | ||
1139 | status = ocfs2_journal_access_di(handle, alloc_inode, fe_bh, | 1140 | status = ocfs2_journal_access_di(handle, INODE_CACHE(alloc_inode), |
1140 | OCFS2_JOURNAL_ACCESS_WRITE); | 1141 | fe_bh, OCFS2_JOURNAL_ACCESS_WRITE); |
1141 | if (status < 0) { | 1142 | if (status < 0) { |
1142 | mlog_errno(status); | 1143 | mlog_errno(status); |
1143 | goto out_rollback; | 1144 | goto out_rollback; |
@@ -1288,7 +1289,7 @@ static int ocfs2_alloc_dinode_update_counts(struct inode *inode, | |||
1288 | struct ocfs2_dinode *di = (struct ocfs2_dinode *) di_bh->b_data; | 1289 | struct ocfs2_dinode *di = (struct ocfs2_dinode *) di_bh->b_data; |
1289 | struct ocfs2_chain_list *cl = (struct ocfs2_chain_list *) &di->id2.i_chain; | 1290 | struct ocfs2_chain_list *cl = (struct ocfs2_chain_list *) &di->id2.i_chain; |
1290 | 1291 | ||
1291 | ret = ocfs2_journal_access_di(handle, inode, di_bh, | 1292 | ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, |
1292 | OCFS2_JOURNAL_ACCESS_WRITE); | 1293 | OCFS2_JOURNAL_ACCESS_WRITE); |
1293 | if (ret < 0) { | 1294 | if (ret < 0) { |
1294 | mlog_errno(ret); | 1295 | mlog_errno(ret); |
@@ -1461,7 +1462,7 @@ static int ocfs2_search_chain(struct ocfs2_alloc_context *ac, | |||
1461 | /* Ok, claim our bits now: set the info on dinode, chainlist | 1462 | /* Ok, claim our bits now: set the info on dinode, chainlist |
1462 | * and then the group */ | 1463 | * and then the group */ |
1463 | status = ocfs2_journal_access_di(handle, | 1464 | status = ocfs2_journal_access_di(handle, |
1464 | alloc_inode, | 1465 | INODE_CACHE(alloc_inode), |
1465 | ac->ac_bh, | 1466 | ac->ac_bh, |
1466 | OCFS2_JOURNAL_ACCESS_WRITE); | 1467 | OCFS2_JOURNAL_ACCESS_WRITE); |
1467 | if (status < 0) { | 1468 | if (status < 0) { |
@@ -1907,8 +1908,8 @@ static inline int ocfs2_block_group_clear_bits(handle_t *handle, | |||
1907 | if (ocfs2_is_cluster_bitmap(alloc_inode)) | 1908 | if (ocfs2_is_cluster_bitmap(alloc_inode)) |
1908 | journal_type = OCFS2_JOURNAL_ACCESS_UNDO; | 1909 | journal_type = OCFS2_JOURNAL_ACCESS_UNDO; |
1909 | 1910 | ||
1910 | status = ocfs2_journal_access_gd(handle, alloc_inode, group_bh, | 1911 | status = ocfs2_journal_access_gd(handle, INODE_CACHE(alloc_inode), |
1911 | journal_type); | 1912 | group_bh, journal_type); |
1912 | if (status < 0) { | 1913 | if (status < 0) { |
1913 | mlog_errno(status); | 1914 | mlog_errno(status); |
1914 | goto bail; | 1915 | goto bail; |
@@ -1993,8 +1994,8 @@ int ocfs2_free_suballoc_bits(handle_t *handle, | |||
1993 | goto bail; | 1994 | goto bail; |
1994 | } | 1995 | } |
1995 | 1996 | ||
1996 | status = ocfs2_journal_access_di(handle, alloc_inode, alloc_bh, | 1997 | status = ocfs2_journal_access_di(handle, INODE_CACHE(alloc_inode), |
1997 | OCFS2_JOURNAL_ACCESS_WRITE); | 1998 | alloc_bh, OCFS2_JOURNAL_ACCESS_WRITE); |
1998 | if (status < 0) { | 1999 | if (status < 0) { |
1999 | mlog_errno(status); | 2000 | mlog_errno(status); |
2000 | goto bail; | 2001 | goto bail; |
@@ -2151,7 +2152,7 @@ int ocfs2_lock_allocators(struct inode *inode, | |||
2151 | 2152 | ||
2152 | BUG_ON(clusters_to_add != 0 && data_ac == NULL); | 2153 | BUG_ON(clusters_to_add != 0 && data_ac == NULL); |
2153 | 2154 | ||
2154 | num_free_extents = ocfs2_num_free_extents(osb, inode, et); | 2155 | num_free_extents = ocfs2_num_free_extents(osb, et); |
2155 | if (num_free_extents < 0) { | 2156 | if (num_free_extents < 0) { |
2156 | ret = num_free_extents; | 2157 | ret = num_free_extents; |
2157 | mlog_errno(ret); | 2158 | mlog_errno(ret); |