mirror of
https://github.com/torvalds/linux.git
synced 2026-03-09 18:16:36 +01:00
btrfs: remove out label in finish_verity()
There is no point in having the label since all it does is return the value in the 'ret' variable. Instead make every goto return directly and remove the label. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> 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
6329592ca6
commit
61fb7f04ee
1 changed files with 5 additions and 8 deletions
|
|
@ -525,23 +525,21 @@ static int finish_verity(struct btrfs_inode *inode, const void *desc,
|
|||
ret = write_key_bytes(inode, BTRFS_VERITY_DESC_ITEM_KEY, 0,
|
||||
(const char *)&item, sizeof(item));
|
||||
if (ret)
|
||||
goto out;
|
||||
return ret;
|
||||
|
||||
/* Write out the descriptor itself */
|
||||
ret = write_key_bytes(inode, BTRFS_VERITY_DESC_ITEM_KEY, 1,
|
||||
desc, desc_size);
|
||||
if (ret)
|
||||
goto out;
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* 1 for updating the inode flag
|
||||
* 1 for deleting the orphan
|
||||
*/
|
||||
trans = btrfs_start_transaction(root, 2);
|
||||
if (IS_ERR(trans)) {
|
||||
ret = PTR_ERR(trans);
|
||||
goto out;
|
||||
}
|
||||
if (IS_ERR(trans))
|
||||
return PTR_ERR(trans);
|
||||
inode->ro_flags |= BTRFS_INODE_RO_VERITY;
|
||||
btrfs_sync_inode_flags_to_i_flags(inode);
|
||||
ret = btrfs_update_inode(trans, inode);
|
||||
|
|
@ -554,8 +552,7 @@ static int finish_verity(struct btrfs_inode *inode, const void *desc,
|
|||
btrfs_set_fs_compat_ro(root->fs_info, VERITY);
|
||||
end_trans:
|
||||
btrfs_end_transaction(trans);
|
||||
out:
|
||||
return ret;
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue