]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
btrfs: Remove unnecessary casts in btrfs_read_root_item
authorYueHaibing <yuehaibing@huawei.com>
Wed, 20 Feb 2019 12:32:02 +0000 (12:32 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Feb 2019 13:19:23 +0000 (14:19 +0100)
commitf65e25e343cfc0e6f4db9a687c4085fad268325d
tree6cc60e13debb16510fe5387ff6932a4e99dd7f81
parent253002f2e3f4e2bbb0cbdd9e9fe2f5b9ec88f694
btrfs: Remove unnecessary casts in btrfs_read_root_item

There is a messy cast here:
min_t(int, len, (int)sizeof(*item)));

min_t() should normally cast to unsigned.  It's not possible for "len"
to be negative, but if it were then we definitely wouldn't want to pass
negatives to read_extent_buffer().  Also there is an extra cast.

This patch shouldn't affect runtime, it's just a clean up.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/root-tree.c