aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/inode.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/inode.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/inode.c')
-rw-r--r--fs/ocfs2/inode.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index 278a223aae14..7cc0b4665d5e 100644
--- a/fs/ocfs2/inode.c
+++ b/fs/ocfs2/inode.c
@@ -657,12 +657,7 @@ static int ocfs2_remove_inode(struct inode *inode,
657 657
658 di->i_dtime = cpu_to_le64(CURRENT_TIME.tv_sec); 658 di->i_dtime = cpu_to_le64(CURRENT_TIME.tv_sec);
659 di->i_flags &= cpu_to_le32(~(OCFS2_VALID_FL | OCFS2_ORPHANED_FL)); 659 di->i_flags &= cpu_to_le32(~(OCFS2_VALID_FL | OCFS2_ORPHANED_FL));
660 660 ocfs2_journal_dirty(handle, di_bh);
661 status = ocfs2_journal_dirty(handle, di_bh);
662 if (status < 0) {
663 mlog_errno(status);
664 goto bail_commit;
665 }
666 661
667 ocfs2_remove_from_cache(INODE_CACHE(inode), di_bh); 662 ocfs2_remove_from_cache(INODE_CACHE(inode), di_bh);
668 dquot_free_inode(inode); 663 dquot_free_inode(inode);
@@ -1276,13 +1271,8 @@ int ocfs2_mark_inode_dirty(handle_t *handle,
1276 fe->i_mtime = cpu_to_le64(inode->i_mtime.tv_sec); 1271 fe->i_mtime = cpu_to_le64(inode->i_mtime.tv_sec);
1277 fe->i_mtime_nsec = cpu_to_le32(inode->i_mtime.tv_nsec); 1272 fe->i_mtime_nsec = cpu_to_le32(inode->i_mtime.tv_nsec);
1278 1273
1279 status = ocfs2_journal_dirty(handle, bh); 1274 ocfs2_journal_dirty(handle, bh);
1280 if (status < 0)
1281 mlog_errno(status);
1282
1283 status = 0;
1284leave: 1275leave:
1285
1286 mlog_exit(status); 1276 mlog_exit(status);
1287 return status; 1277 return status;
1288} 1278}