aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/localalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/localalloc.c')
-rw-r--r--fs/ocfs2/localalloc.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c
index c983715d8d8c..7e7dd65d97ef 100644
--- a/fs/ocfs2/localalloc.c
+++ b/fs/ocfs2/localalloc.c
@@ -305,12 +305,7 @@ void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb)
305 } 305 }
306 306
307 ocfs2_clear_local_alloc(alloc); 307 ocfs2_clear_local_alloc(alloc);
308 308 ocfs2_journal_dirty(handle, bh);
309 status = ocfs2_journal_dirty(handle, bh);
310 if (status < 0) {
311 mlog_errno(status);
312 goto out_commit;
313 }
314 309
315 brelse(bh); 310 brelse(bh);
316 osb->local_alloc_bh = NULL; 311 osb->local_alloc_bh = NULL;
@@ -691,14 +686,8 @@ int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb,
691 ocfs2_set_bit(start++, bitmap); 686 ocfs2_set_bit(start++, bitmap);
692 687
693 le32_add_cpu(&alloc->id1.bitmap1.i_used, *num_bits); 688 le32_add_cpu(&alloc->id1.bitmap1.i_used, *num_bits);
689 ocfs2_journal_dirty(handle, osb->local_alloc_bh);
694 690
695 status = ocfs2_journal_dirty(handle, osb->local_alloc_bh);
696 if (status < 0) {
697 mlog_errno(status);
698 goto bail;
699 }
700
701 status = 0;
702bail: 691bail:
703 mlog_exit(status); 692 mlog_exit(status);
704 return status; 693 return status;
@@ -1169,12 +1158,7 @@ static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb,
1169 } 1158 }
1170 1159
1171 ocfs2_clear_local_alloc(alloc); 1160 ocfs2_clear_local_alloc(alloc);
1172 1161 ocfs2_journal_dirty(handle, osb->local_alloc_bh);
1173 status = ocfs2_journal_dirty(handle, osb->local_alloc_bh);
1174 if (status < 0) {
1175 mlog_errno(status);
1176 goto bail;
1177 }
1178 1162
1179 status = ocfs2_sync_local_to_main(osb, handle, alloc_copy, 1163 status = ocfs2_sync_local_to_main(osb, handle, alloc_copy,
1180 main_bm_inode, main_bm_bh); 1164 main_bm_inode, main_bm_bh);
@@ -1192,7 +1176,6 @@ static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb,
1192 1176
1193 atomic_inc(&osb->alloc_stats.moves); 1177 atomic_inc(&osb->alloc_stats.moves);
1194 1178
1195 status = 0;
1196bail: 1179bail:
1197 if (handle) 1180 if (handle)
1198 ocfs2_commit_trans(osb, handle); 1181 ocfs2_commit_trans(osb, handle);