ocfs2: remove duplicated mlog_errno() in ocfs2_relink_block_group

Cc: Jie Liu <jeff.liu@oracle.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Sunil Mushran <sunil.mushran@gmail.com>
Cc: Younger Liu <younger.liu@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Andrew Morton 2013-07-03 15:01:00 -07:00 committed by Linus Torvalds
parent 493098413b
commit 25e2892101
1 changed files with 6 additions and 12 deletions

View File

@ -1443,44 +1443,38 @@ static int ocfs2_relink_block_group(handle_t *handle,
status = ocfs2_journal_access_gd(handle, INODE_CACHE(alloc_inode), status = ocfs2_journal_access_gd(handle, INODE_CACHE(alloc_inode),
prev_bg_bh, prev_bg_bh,
OCFS2_JOURNAL_ACCESS_WRITE); OCFS2_JOURNAL_ACCESS_WRITE);
if (status < 0) { if (status < 0)
mlog_errno(status);
goto out; goto out;
}
prev_bg->bg_next_group = bg->bg_next_group; prev_bg->bg_next_group = bg->bg_next_group;
ocfs2_journal_dirty(handle, prev_bg_bh); ocfs2_journal_dirty(handle, prev_bg_bh);
status = ocfs2_journal_access_gd(handle, INODE_CACHE(alloc_inode), status = ocfs2_journal_access_gd(handle, INODE_CACHE(alloc_inode),
bg_bh, OCFS2_JOURNAL_ACCESS_WRITE); bg_bh, OCFS2_JOURNAL_ACCESS_WRITE);
if (status < 0) { if (status < 0)
mlog_errno(status);
goto out_rollback_prev_bg; goto out_rollback_prev_bg;
}
bg->bg_next_group = fe->id2.i_chain.cl_recs[chain].c_blkno; bg->bg_next_group = fe->id2.i_chain.cl_recs[chain].c_blkno;
ocfs2_journal_dirty(handle, bg_bh); ocfs2_journal_dirty(handle, bg_bh);
status = ocfs2_journal_access_di(handle, INODE_CACHE(alloc_inode), status = ocfs2_journal_access_di(handle, INODE_CACHE(alloc_inode),
fe_bh, OCFS2_JOURNAL_ACCESS_WRITE); fe_bh, OCFS2_JOURNAL_ACCESS_WRITE);
if (status < 0) { if (status < 0)
mlog_errno(status);
goto out_rollback_bg; goto out_rollback_bg;
}
fe->id2.i_chain.cl_recs[chain].c_blkno = bg->bg_blkno; fe->id2.i_chain.cl_recs[chain].c_blkno = bg->bg_blkno;
ocfs2_journal_dirty(handle, fe_bh); ocfs2_journal_dirty(handle, fe_bh);
out: out:
if (status < 0)
mlog_errno(status);
return status; return status;
out_rollback_bg: out_rollback_bg:
bg->bg_next_group = cpu_to_le64(bg_ptr); bg->bg_next_group = cpu_to_le64(bg_ptr);
out_rollback_prev_bg: out_rollback_prev_bg:
prev_bg->bg_next_group = cpu_to_le64(prev_bg_ptr); prev_bg->bg_next_group = cpu_to_le64(prev_bg_ptr);
goto out;
mlog_errno(status);
return status;
} }
static inline int ocfs2_block_group_reasonably_empty(struct ocfs2_group_desc *bg, static inline int ocfs2_block_group_reasonably_empty(struct ocfs2_group_desc *bg,