btrfs: simplify btrfs_should_throttle_delayed_refs()
authorFilipe Manana <fdmanana@suse.com>
Tue, 21 Mar 2023 11:13:43 +0000 (11:13 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Apr 2023 16:01:18 +0000 (18:01 +0200)
commitcf5fa929b7f561b78e3e4d7781232cf6fb94c988
tree804ac877429006de918c6caa1d11f9103b224a4c
parent3a49a5489490acec43c66ad9db62f090af9d9f73
btrfs: simplify btrfs_should_throttle_delayed_refs()

Currently btrfs_should_throttle_delayed_refs() returns 1 or 2 in case the
delayed refs should be throttled, however the only caller (inode eviction
and truncation path) does not care about those two different conditions,
it treats the return value as a boolean. This allows us to remove one of
the conditions in btrfs_should_throttle_delayed_refs() and change its
return value from 'int' to 'bool'. So just do that.

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>
fs/btrfs/delayed-ref.c
fs/btrfs/delayed-ref.h