Skip to content

Commit 25e2892

Browse files
akpm00torvalds
authored andcommitted
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>
1 parent 4930984 commit 25e2892

1 file changed

Lines changed: 6 additions & 12 deletions

File tree

‎fs/ocfs2/suballoc.c‎

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,44 +1443,38 @@ static int ocfs2_relink_block_group(handle_t *handle,
14431443
status = ocfs2_journal_access_gd(handle, INODE_CACHE(alloc_inode),
14441444
prev_bg_bh,
14451445
OCFS2_JOURNAL_ACCESS_WRITE);
1446-
if (status < 0) {
1447-
mlog_errno(status);
1446+
if (status < 0)
14481447
goto out;
1449-
}
14501448

14511449
prev_bg->bg_next_group = bg->bg_next_group;
14521450
ocfs2_journal_dirty(handle, prev_bg_bh);
14531451

14541452
status = ocfs2_journal_access_gd(handle, INODE_CACHE(alloc_inode),
14551453
bg_bh, OCFS2_JOURNAL_ACCESS_WRITE);
1456-
if (status < 0) {
1457-
mlog_errno(status);
1454+
if (status < 0)
14581455
goto out_rollback_prev_bg;
1459-
}
14601456

14611457
bg->bg_next_group = fe->id2.i_chain.cl_recs[chain].c_blkno;
14621458
ocfs2_journal_dirty(handle, bg_bh);
14631459

14641460
status = ocfs2_journal_access_di(handle, INODE_CACHE(alloc_inode),
14651461
fe_bh, OCFS2_JOURNAL_ACCESS_WRITE);
1466-
if (status < 0) {
1467-
mlog_errno(status);
1462+
if (status < 0)
14681463
goto out_rollback_bg;
1469-
}
14701464

14711465
fe->id2.i_chain.cl_recs[chain].c_blkno = bg->bg_blkno;
14721466
ocfs2_journal_dirty(handle, fe_bh);
14731467

14741468
out:
1469+
if (status < 0)
1470+
mlog_errno(status);
14751471
return status;
14761472

14771473
out_rollback_bg:
14781474
bg->bg_next_group = cpu_to_le64(bg_ptr);
14791475
out_rollback_prev_bg:
14801476
prev_bg->bg_next_group = cpu_to_le64(prev_bg_ptr);
1481-
1482-
mlog_errno(status);
1483-
return status;
1477+
goto out;
14841478
}
14851479

14861480
static inline int ocfs2_block_group_reasonably_empty(struct ocfs2_group_desc *bg,

0 commit comments

Comments
 (0)