aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/refcounttree.c
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2010-03-19 17:13:52 -0400
committerJoel Becker <joel.becker@oracle.com>2010-05-05 21:17:29 -0400
commitec20cec7a351584ca6c70ead012e73d61f9a8e04 (patch)
tree39af308ae07ab168313bb50ced1bb1ae7ef7e6a3 /fs/ocfs2/refcounttree.c
parentb4414eea0e7b9c134262c801a87e338bf675962c (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/refcounttree.c')
-rw-r--r--fs/ocfs2/refcounttree.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
index 29405f2ff616..4b0b4eb79352 100644
--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c
@@ -1269,9 +1269,7 @@ static int ocfs2_change_refcount_rec(handle_t *handle,
1269 } else if (merge) 1269 } else if (merge)
1270 ocfs2_refcount_rec_merge(rb, index); 1270 ocfs2_refcount_rec_merge(rb, index);
1271 1271
1272 ret = ocfs2_journal_dirty(handle, ref_leaf_bh); 1272 ocfs2_journal_dirty(handle, ref_leaf_bh);
1273 if (ret)
1274 mlog_errno(ret);
1275out: 1273out:
1276 return ret; 1274 return ret;
1277} 1275}
@@ -1803,11 +1801,7 @@ static int ocfs2_insert_refcount_rec(handle_t *handle,
1803 if (merge) 1801 if (merge)
1804 ocfs2_refcount_rec_merge(rb, index); 1802 ocfs2_refcount_rec_merge(rb, index);
1805 1803
1806 ret = ocfs2_journal_dirty(handle, ref_leaf_bh); 1804 ocfs2_journal_dirty(handle, ref_leaf_bh);
1807 if (ret) {
1808 mlog_errno(ret);
1809 goto out;
1810 }
1811 1805
1812 if (index == 0) { 1806 if (index == 0) {
1813 ret = ocfs2_adjust_refcount_rec(handle, ci, 1807 ret = ocfs2_adjust_refcount_rec(handle, ci,
@@ -1978,9 +1972,7 @@ static int ocfs2_split_refcount_rec(handle_t *handle,
1978 ocfs2_refcount_rec_merge(rb, index); 1972 ocfs2_refcount_rec_merge(rb, index);
1979 } 1973 }
1980 1974
1981 ret = ocfs2_journal_dirty(handle, ref_leaf_bh); 1975 ocfs2_journal_dirty(handle, ref_leaf_bh);
1982 if (ret)
1983 mlog_errno(ret);
1984 1976
1985out: 1977out:
1986 brelse(new_bh); 1978 brelse(new_bh);
@@ -3041,11 +3033,7 @@ static int ocfs2_duplicate_clusters_by_jbd(handle_t *handle,
3041 } 3033 }
3042 3034
3043 memcpy(new_bh->b_data, old_bh->b_data, sb->s_blocksize); 3035 memcpy(new_bh->b_data, old_bh->b_data, sb->s_blocksize);
3044 ret = ocfs2_journal_dirty(handle, new_bh); 3036 ocfs2_journal_dirty(handle, new_bh);
3045 if (ret) {
3046 mlog_errno(ret);
3047 break;
3048 }
3049 3037
3050 brelse(new_bh); 3038 brelse(new_bh);
3051 brelse(old_bh); 3039 brelse(old_bh);