]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit088a39673eb3ab3be86f7a9496ba1b5de6ea1cd8
tree886fb9715981ee491d7c849fcb7148ea3c89c8a7
parent7852594a4791c3b3c66cea994cd47704a164731b
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