diff options
author | Filipe Manana <fdmanana@suse.com> | 2023-09-08 20:20:33 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-10-12 17:44:06 +0300 |
commit | da8848ac6a1b3a3b3a2bd412f943e3e23b5e05fe (patch) | |
tree | c97e4bfc8bf9403180d2f3d159d04091f905de03 /fs/btrfs/dev-replace.c | |
parent | eba444f1c0ecaf4a1992fb40a2c9e7a8cb3fdd5d (diff) | |
download | linux-da8848ac6a1b3a3b3a2bd412f943e3e23b5e05fe.tar.xz |
btrfs: simplify check for extent item overrun at lookup_inline_extent_backref()
At lookup_inline_extent_backref() we can simplify the check for an overrun
of the extent item by making the while loop's condition to be "ptr < end"
and then check after the loop if an overrun happened ("ptr > end"). This
reduces indentation and makes the loop condition more clear. So move the
check out of the loop and change the loop condition accordingly, while
also adding the 'unlikely' tag to the check since it's not supposed to be
triggered.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions