mirror of
https://github.com/torvalds/linux.git
synced 2025-11-02 17:49:03 +02:00
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>
This commit is contained in:
parent
26558ce574
commit
fe84a1e235
1 changed files with 10 additions and 18 deletions
|
|
@ -7038,24 +7038,18 @@ static int btrfs_log_inode_parent(struct btrfs_trans_handle *trans,
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
bool log_dentries;
|
bool log_dentries;
|
||||||
|
|
||||||
if (btrfs_test_opt(fs_info, NOTREELOG)) {
|
if (btrfs_test_opt(fs_info, NOTREELOG))
|
||||||
ret = BTRFS_LOG_FORCE_COMMIT;
|
return BTRFS_LOG_FORCE_COMMIT;
|
||||||
goto end_no_trans;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (btrfs_root_refs(&root->root_item) == 0) {
|
if (btrfs_root_refs(&root->root_item) == 0)
|
||||||
ret = BTRFS_LOG_FORCE_COMMIT;
|
return BTRFS_LOG_FORCE_COMMIT;
|
||||||
goto end_no_trans;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we're logging an inode from a subvolume created in the current
|
* If we're logging an inode from a subvolume created in the current
|
||||||
* transaction we must force a commit since the root is not persisted.
|
* transaction we must force a commit since the root is not persisted.
|
||||||
*/
|
*/
|
||||||
if (btrfs_root_generation(&root->root_item) == trans->transid) {
|
if (btrfs_root_generation(&root->root_item) == trans->transid)
|
||||||
ret = BTRFS_LOG_FORCE_COMMIT;
|
return BTRFS_LOG_FORCE_COMMIT;
|
||||||
goto end_no_trans;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Skip already logged inodes or inodes corresponding to tmpfiles
|
* Skip already logged inodes or inodes corresponding to tmpfiles
|
||||||
|
|
@ -7064,14 +7058,12 @@ static int btrfs_log_inode_parent(struct btrfs_trans_handle *trans,
|
||||||
*/
|
*/
|
||||||
if ((btrfs_inode_in_log(inode, trans->transid) &&
|
if ((btrfs_inode_in_log(inode, trans->transid) &&
|
||||||
list_empty(&ctx->ordered_extents)) ||
|
list_empty(&ctx->ordered_extents)) ||
|
||||||
inode->vfs_inode.i_nlink == 0) {
|
inode->vfs_inode.i_nlink == 0)
|
||||||
ret = BTRFS_NO_LOG_SYNC;
|
return BTRFS_NO_LOG_SYNC;
|
||||||
goto end_no_trans;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = start_log_trans(trans, root, ctx);
|
ret = start_log_trans(trans, root, ctx);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto end_no_trans;
|
return ret;
|
||||||
|
|
||||||
ret = btrfs_log_inode(trans, inode, inode_only, ctx);
|
ret = btrfs_log_inode(trans, inode, inode_only, ctx);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
@ -7158,7 +7150,7 @@ static int btrfs_log_inode_parent(struct btrfs_trans_handle *trans,
|
||||||
if (ret)
|
if (ret)
|
||||||
btrfs_remove_log_ctx(root, ctx);
|
btrfs_remove_log_ctx(root, ctx);
|
||||||
btrfs_end_log_trans(root);
|
btrfs_end_log_trans(root);
|
||||||
end_no_trans:
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue