aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2020-08-12 16:16:35 +0300
committerDavid Sterba <dsterba@suse.com>2020-10-07 12:12:14 +0200
commit217f5004fee678bf238fbbc7e7a01c55df92e732 (patch)
treee596f952cda8d74ed9d435c9e00dbce04f0b59d0 /fs/btrfs/extent-tree.c
parentbtrfs: qgroup: fix qgroup meta rsv leak for subvolume operations (diff)
downloadlinux-dev-217f5004fee678bf238fbbc7e7a01c55df92e732.tar.xz
linux-dev-217f5004fee678bf238fbbc7e7a01c55df92e732.zip
btrfs: rework error detection in init_tree_roots
To avoid duplicating 3 lines of code the error detection logic in init_tree_roots is somewhat quirky. It first checks for the presence of any error condition, then checks for the specific condition to perform any specific actions. That's spurious because directly checking for each respective error condition and doing the necessary steps is more obvious. While at it change the -EUCLEAN to -EIO in case the extent buffer is not read correctly, this is in line with other sites which return -EIO when the eb couldn't be read. Additionally it results in smaller code and the code reads more linearly: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-95 (-95) Function old new delta open_ctree 17243 17148 -95 Total: Before=113104, After=113009, chg -0.08% Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
0 files changed, 0 insertions, 0 deletions