mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02: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
|
|
@ -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,
|
ret = write_key_bytes(inode, BTRFS_VERITY_DESC_ITEM_KEY, 0,
|
||||||
(const char *)&item, sizeof(item));
|
(const char *)&item, sizeof(item));
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
return ret;
|
||||||
|
|
||||||
/* Write out the descriptor itself */
|
/* Write out the descriptor itself */
|
||||||
ret = write_key_bytes(inode, BTRFS_VERITY_DESC_ITEM_KEY, 1,
|
ret = write_key_bytes(inode, BTRFS_VERITY_DESC_ITEM_KEY, 1,
|
||||||
desc, desc_size);
|
desc, desc_size);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
return ret;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 1 for updating the inode flag
|
* 1 for updating the inode flag
|
||||||
* 1 for deleting the orphan
|
* 1 for deleting the orphan
|
||||||
*/
|
*/
|
||||||
trans = btrfs_start_transaction(root, 2);
|
trans = btrfs_start_transaction(root, 2);
|
||||||
if (IS_ERR(trans)) {
|
if (IS_ERR(trans))
|
||||||
ret = PTR_ERR(trans);
|
return PTR_ERR(trans);
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
inode->ro_flags |= BTRFS_INODE_RO_VERITY;
|
inode->ro_flags |= BTRFS_INODE_RO_VERITY;
|
||||||
btrfs_sync_inode_flags_to_i_flags(inode);
|
btrfs_sync_inode_flags_to_i_flags(inode);
|
||||||
ret = btrfs_update_inode(trans, 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);
|
btrfs_set_fs_compat_ro(root->fs_info, VERITY);
|
||||||
end_trans:
|
end_trans:
|
||||||
btrfs_end_transaction(trans);
|
btrfs_end_transaction(trans);
|
||||||
out:
|
return 0;
|
||||||
return ret;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user