]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Consolidate retval checking of core btree functions
authorNikolay Borisov <nborisov@suse.com>
Mon, 17 Dec 2018 09:49:00 +0000 (11:49 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Feb 2019 13:13:22 +0000 (14:13 +0100)
commit29a73c40fc149cff13aaa9e4fb0c6cd510d09045
tree93f5a015c7e6f35aab373403e48881d039384d8d
parent088a39673eb3ab3be86f7a9496ba1b5de6ea1cd8
btrfs: Consolidate retval checking of core btree functions

Core btree functions in btrfs generally return 0 when an item is found,
1 in case the sought item cannot be found and <0 when an error happens.
Consolidate the checks for those conditions in one 'if () {} else if ()
{}' construct rather than 2 separate 'if () {}' statements. This
emphasizes that the handling code pertains to a single function. No
functional changes.

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