Skip to content

Commit 229ba1f

Browse files
wangyan0507torvalds
authored andcommitted
ocfs2: clean up some unnecessary code
Several functions have some unnecessary code, clean up these code. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Yan Wang <[email protected]> Reviewed-by: Jun Piao <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Joel Becker <[email protected]> Cc: Junxiao Bi <[email protected]> Cc: Joseph Qi <[email protected]> Cc: Changwei Ge <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 93f5920 commit 229ba1f

File tree

3 files changed

+5
-19
lines changed

3 files changed

+5
-19
lines changed

fs/ocfs2/alloc.c

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -932,13 +932,11 @@ static int ocfs2_validate_extent_block(struct super_block *sb,
932932
goto bail;
933933
}
934934

935-
if (le32_to_cpu(eb->h_fs_generation) != OCFS2_SB(sb)->fs_generation) {
935+
if (le32_to_cpu(eb->h_fs_generation) != OCFS2_SB(sb)->fs_generation)
936936
rc = ocfs2_error(sb,
937937
"Extent block #%llu has an invalid h_fs_generation of #%u\n",
938938
(unsigned long long)bh->b_blocknr,
939939
le32_to_cpu(eb->h_fs_generation));
940-
goto bail;
941-
}
942940
bail:
943941
return rc;
944942
}
@@ -1596,10 +1594,8 @@ static int ocfs2_grow_tree(handle_t *handle, struct ocfs2_extent_tree *et,
15961594
* the new data. */
15971595
ret = ocfs2_add_branch(handle, et, bh, last_eb_bh,
15981596
meta_ac);
1599-
if (ret < 0) {
1597+
if (ret < 0)
16001598
mlog_errno(ret);
1601-
goto out;
1602-
}
16031599

16041600
out:
16051601
if (final_depth)
@@ -5518,10 +5514,8 @@ static int ocfs2_truncate_rec(handle_t *handle,
55185514
ocfs2_journal_dirty(handle, path_leaf_bh(path));
55195515

55205516
ret = ocfs2_rotate_tree_left(handle, et, path, dealloc);
5521-
if (ret) {
5517+
if (ret)
55225518
mlog_errno(ret);
5523-
goto out;
5524-
}
55255519

55265520
out:
55275521
ocfs2_free_path(left_path);
@@ -5654,10 +5648,8 @@ int ocfs2_remove_extent(handle_t *handle,
56545648

56555649
ret = ocfs2_truncate_rec(handle, et, path, index, dealloc,
56565650
cpos, len);
5657-
if (ret) {
5651+
if (ret)
56585652
mlog_errno(ret);
5659-
goto out;
5660-
}
56615653
}
56625654

56635655
out:
@@ -5702,7 +5694,6 @@ static int ocfs2_reserve_blocks_for_rec_trunc(struct inode *inode,
57025694
if (ret < 0) {
57035695
if (ret != -ENOSPC)
57045696
mlog_errno(ret);
5705-
goto out;
57065697
}
57075698
}
57085699

fs/ocfs2/cluster/tcp.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,8 +872,6 @@ int o2net_register_handler(u32 msg_type, u32 key, u32 max_len,
872872
"for type %u key %08x\n", msg_type, key);
873873
}
874874
write_unlock(&o2net_handler_lock);
875-
if (ret)
876-
goto out;
877875

878876
out:
879877
if (ret)

fs/ocfs2/inode.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -637,10 +637,8 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb,
637637
handle = NULL;
638638

639639
status = ocfs2_commit_truncate(osb, inode, fe_bh);
640-
if (status < 0) {
640+
if (status < 0)
641641
mlog_errno(status);
642-
goto out;
643-
}
644642
}
645643

646644
out:
@@ -1499,7 +1497,6 @@ static int ocfs2_filecheck_validate_inode_block(struct super_block *sb,
14991497
(unsigned long long)bh->b_blocknr,
15001498
le32_to_cpu(di->i_fs_generation));
15011499
rc = -OCFS2_FILECHECK_ERR_GENERATION;
1502-
goto bail;
15031500
}
15041501

15051502
bail:

0 commit comments

Comments
 (0)