]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: make get_state_failrec return failrec directly
authorNikolay Borisov <nborisov@suse.com>
Thu, 2 Jul 2020 12:23:28 +0000 (15:23 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 27 Jul 2020 10:55:39 +0000 (12:55 +0200)
commitc31bb0fb652d56967eb6d5442eb2f3742936b404
treed75262d88f6a363510c92cf5596354808a4455c5
parent5fad2f065f0ab56fc3cc08239f2a07a5ffc95170
btrfs: make get_state_failrec return failrec directly

Only failure that get_state_failrec can get is if there is no failure
for the given address. There is no reason why the function should return
a status code and use a separate parameter for returning the actual
failure rec (if one is found). Simplify it by making the return type
a pointer and return ERR_PTR value in case of errors.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-io-tree.h
fs/btrfs/extent_io.c