diff options
author | Joel Becker <joel.becker@oracle.com> | 2010-03-19 17:13:52 -0400 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2010-05-05 21:17:29 -0400 |
commit | ec20cec7a351584ca6c70ead012e73d61f9a8e04 (patch) | |
tree | 39af308ae07ab168313bb50ced1bb1ae7ef7e6a3 /fs/ocfs2/localalloc.c | |
parent | b4414eea0e7b9c134262c801a87e338bf675962c (diff) |
ocfs2: Make ocfs2_journal_dirty() void.
jbd[2]_journal_dirty_metadata() only returns 0. It's been returning 0
since before the kernel moved to git. There is no point in checking
this error.
ocfs2_journal_dirty() has been faithfully returning the status since the
beginning. All over ocfs2, we have blocks of code checking this can't
fail status. In the past few years, we've tried to avoid adding these
checks, because they are pointless. But anyone who looks at our code
assumes they are needed.
Finally, ocfs2_journal_dirty() is made a void function. All error
checking is removed from other files. We'll BUG_ON() the status of
jbd2_journal_dirty_metadata() just in case they change it someday. They
won't.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/localalloc.c')
-rw-r--r-- | fs/ocfs2/localalloc.c | 23 |
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; | ||
702 | bail: | 691 | bail: |
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; | ||
1196 | bail: | 1179 | bail: |
1197 | if (handle) | 1180 | if (handle) |
1198 | ocfs2_commit_trans(osb, handle); | 1181 | ocfs2_commit_trans(osb, handle); |