Skip to content

Commit fe84a1e

Browse files
fdmananakdave
authored andcommitted
btrfs: remove end_no_trans label from btrfs_log_inode_parent()
It's a pointless label as we don't have to do anything under it other than return from the function. So remove it and directly return from the function where we used to goto. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 26558ce commit fe84a1e

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

fs/btrfs/tree-log.c

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7038,24 +7038,18 @@ static int btrfs_log_inode_parent(struct btrfs_trans_handle *trans,
70387038
int ret = 0;
70397039
bool log_dentries;
70407040

7041-
if (btrfs_test_opt(fs_info, NOTREELOG)) {
7042-
ret = BTRFS_LOG_FORCE_COMMIT;
7043-
goto end_no_trans;
7044-
}
7041+
if (btrfs_test_opt(fs_info, NOTREELOG))
7042+
return BTRFS_LOG_FORCE_COMMIT;
70457043

7046-
if (btrfs_root_refs(&root->root_item) == 0) {
7047-
ret = BTRFS_LOG_FORCE_COMMIT;
7048-
goto end_no_trans;
7049-
}
7044+
if (btrfs_root_refs(&root->root_item) == 0)
7045+
return BTRFS_LOG_FORCE_COMMIT;
70507046

70517047
/*
70527048
* If we're logging an inode from a subvolume created in the current
70537049
* transaction we must force a commit since the root is not persisted.
70547050
*/
7055-
if (btrfs_root_generation(&root->root_item) == trans->transid) {
7056-
ret = BTRFS_LOG_FORCE_COMMIT;
7057-
goto end_no_trans;
7058-
}
7051+
if (btrfs_root_generation(&root->root_item) == trans->transid)
7052+
return BTRFS_LOG_FORCE_COMMIT;
70597053

70607054
/*
70617055
* Skip already logged inodes or inodes corresponding to tmpfiles
@@ -7064,14 +7058,12 @@ static int btrfs_log_inode_parent(struct btrfs_trans_handle *trans,
70647058
*/
70657059
if ((btrfs_inode_in_log(inode, trans->transid) &&
70667060
list_empty(&ctx->ordered_extents)) ||
7067-
inode->vfs_inode.i_nlink == 0) {
7068-
ret = BTRFS_NO_LOG_SYNC;
7069-
goto end_no_trans;
7070-
}
7061+
inode->vfs_inode.i_nlink == 0)
7062+
return BTRFS_NO_LOG_SYNC;
70717063

70727064
ret = start_log_trans(trans, root, ctx);
70737065
if (ret)
7074-
goto end_no_trans;
7066+
return ret;
70757067

70767068
ret = btrfs_log_inode(trans, inode, inode_only, ctx);
70777069
if (ret)
@@ -7158,7 +7150,7 @@ static int btrfs_log_inode_parent(struct btrfs_trans_handle *trans,
71587150
if (ret)
71597151
btrfs_remove_log_ctx(root, ctx);
71607152
btrfs_end_log_trans(root);
7161-
end_no_trans:
7153+
71627154
return ret;
71637155
}
71647156

0 commit comments

Comments
 (0)