OSDN Git Service

btrfs: Rename found_type to extent_type in btrfs_get_extent
authorNikolay Borisov <nborisov@suse.com>
Mon, 17 Dec 2018 08:35:59 +0000 (10:35 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Feb 2019 13:13:22 +0000 (14:13 +0100)
commit694c12ed9dcb07ad1adc5a525cc0d8ea4d71734f
tree886fb9715981ee491d7c849fcb7148ea3c89c8a7
parent500710d3b8721250e3e16796e176f57417e72492
btrfs: Rename found_type to extent_type in btrfs_get_extent

found_type really holds the type of extent and is guaranteed to to have
a value between [0, 2]. The only time it can contain anything different
is if btrfs_lookup_file_extent returned a positive value and the
previous item is different than an extent. Avoid this situation by
simply checking found_key.type rather than assigning the item type to
found_type intermittently. Also make the variable an u8 to reduce stack
usage. No functional changes.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c