btrfs: unify the lock/unlock extent variants
authorJosef Bacik <josef@toxicpanda.com>
Fri, 9 Sep 2022 21:53:43 +0000 (17:53 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Sep 2022 10:28:05 +0000 (12:28 +0200)
commit570eb97bace8743f45c6830b64c7a0889d0915dd
treedd6e39e3006b7a4c91abe461074e9fed4e2aa559
parent291bbb1e7ea84ef2aba3a5756b9c573d2c572bd7
btrfs: unify the lock/unlock extent variants

We have two variants of lock/unlock extent, one set that takes a cached
state, another that does not.  This is slightly annoying, and generally
speaking there are only a few places where we don't have a cached state.
Simplify this by making lock_extent/unlock_extent the only variant and
make it take a cached state, then convert all the callers appropriately.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
14 files changed:
fs/btrfs/compression.c
fs/btrfs/disk-io.c
fs/btrfs/extent-io-tree.c
fs/btrfs/extent-io-tree.h
fs/btrfs/extent_io.c
fs/btrfs/file.c
fs/btrfs/free-space-cache.c
fs/btrfs/inode.c
fs/btrfs/ioctl.c
fs/btrfs/ordered-data.c
fs/btrfs/reflink.c
fs/btrfs/relocation.c
fs/btrfs/tests/extent-io-tests.c
fs/btrfs/tree-log.c