]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: use find_first_extent_bit in btrfs_clean_io_failure
authorJosef Bacik <josef@toxicpanda.com>
Fri, 9 Sep 2022 21:53:17 +0000 (17:53 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Sep 2022 10:28:02 +0000 (12:28 +0200)
commit292248eb067095cd35940b5eb6bcab08f9d69abc
tree3fd34bed404283eea8b8dacbe9c1cfe6843fb874
parent71915d860febaadb8b171a99e076301a7c5a9226
btrfs: use find_first_extent_bit in btrfs_clean_io_failure

Currently we're using find_first_extent_bit_state to check if our state
contains the given failrec range, however this is more of an internal
extent_io_tree helper, and is technically unsafe to use because we're
accessing the state outside of the extent_io_tree lock.

Instead use the normal helper find_first_extent_bit which returns the
range of the extent state we find in find_first_extent_bit_state and use
that to do our sanity checking.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c