summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-checker.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2020-09-15 21:44:52 +0200
committerDavid Sterba <dsterba@suse.com>2020-12-08 15:53:52 +0100
commitc842268458d904c04f08259cc7ecee3870fa2746 (patch)
tree4971d80d5555e6d80022566a37abb3c476354a06 /fs/btrfs/tree-checker.c
parentf944d2cb209674411280737d5fb660e98b8a8314 (diff)
btrfs: add set/get accessors for root_item::drop_level
The drop_level member is used directly unlike all the other int types in root_item. Add the definition and use it everywhere. The type is u8 so there's no conversion necessary and the helpers are properly inlined, this is for consistency. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-checker.c')
-rw-r--r--fs/btrfs/tree-checker.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index ea2bb4cb5890..cb9041da7d87 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -1118,10 +1118,10 @@ static int check_root_item(struct extent_buffer *leaf, struct btrfs_key *key,
btrfs_root_level(&ri), BTRFS_MAX_LEVEL - 1);
return -EUCLEAN;
}
- if (ri.drop_level >= BTRFS_MAX_LEVEL) {
+ if (btrfs_root_drop_level(&ri) >= BTRFS_MAX_LEVEL) {
generic_err(leaf, slot,
"invalid root level, have %u expect [0, %u]",
- ri.drop_level, BTRFS_MAX_LEVEL - 1);
+ btrfs_root_drop_level(&ri), BTRFS_MAX_LEVEL - 1);
return -EUCLEAN;
}