diff options
author | David Sterba <dsterba@suse.com> | 2024-02-06 23:20:53 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-03-04 16:24:51 +0100 |
commit | bfe8a0ccbb3a02ff0a3b2e835b550e4180d2f86a (patch) | |
tree | 292ff5d182578f0b13c83e128f49ee88e856db2a /fs/btrfs/backref.c | |
parent | f40a3ea94881f668084f68f6b9931486b1606db0 (diff) | |
download | linux-stable-bfe8a0ccbb3a02ff0a3b2e835b550e4180d2f86a.tar.gz linux-stable-bfe8a0ccbb3a02ff0a3b2e835b550e4180d2f86a.tar.bz2 linux-stable-bfe8a0ccbb3a02ff0a3b2e835b550e4180d2f86a.zip |
btrfs: delete pointless BUG_ONs on extent item size
Checking extent item size in add_inline_refs() is redundant, we do that
already in tree-checker after reading the extent buffer and it won't
change under normal circumstances. It was added long ago in
8da6d5815c592b ("Btrfs: added btrfs_find_all_roots()") and does not seem
to have a clear purpose.
Similar case in extent_from_logical(), added in a542ad1bafc7df ("btrfs:
added helper functions to iterate backrefs").
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/backref.c')
-rw-r--r-- | fs/btrfs/backref.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 6ba743ddfe21..fe05e2f55bf7 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -1036,8 +1036,6 @@ static int add_inline_refs(struct btrfs_backref_walk_ctx *ctx, slot = path->slots[0]; item_size = btrfs_item_size(leaf, slot); - BUG_ON(item_size < sizeof(*ei)); - ei = btrfs_item_ptr(leaf, slot, struct btrfs_extent_item); if (ctx->check_extent_item) { @@ -2256,7 +2254,6 @@ int extent_from_logical(struct btrfs_fs_info *fs_info, u64 logical, eb = path->nodes[0]; item_size = btrfs_item_size(eb, path->slots[0]); - BUG_ON(item_size < sizeof(*ei)); ei = btrfs_item_ptr(eb, path->slots[0], struct btrfs_extent_item); flags = btrfs_extent_flags(eb, ei); |