btrfs: remove unused flag EXTENT_BUFFER_CORRUPT

This flag is no longer being used.  It was added by commit a826d6dcb3
("Btrfs: check items for correctness as we search") but it's no longer
being used after commit f26c923860 ("btrfs: remove reada
infrastructure").

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Daniel Vacek <neelx@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Daniel Vacek 2025-03-25 17:31:38 +01:00 committed by David Sterba
parent 350362e95f
commit c61660ec34
3 changed files with 2 additions and 16 deletions

View file

@ -224,7 +224,6 @@ int btrfs_read_extent_buffer(struct extent_buffer *eb,
ASSERT(check); ASSERT(check);
while (1) { while (1) {
clear_bit(EXTENT_BUFFER_CORRUPT, &eb->bflags);
ret = read_extent_buffer_pages(eb, mirror_num, check); ret = read_extent_buffer_pages(eb, mirror_num, check);
if (!ret) if (!ret)
break; break;
@ -452,15 +451,9 @@ int btrfs_validate_extent_buffer(struct extent_buffer *eb,
goto out; goto out;
} }
/* /* If this is a leaf block and it is corrupt, just return -EIO. */
* If this is a leaf block and it is corrupt, set the corrupt bit so if (found_level == 0 && btrfs_check_leaf(eb))
* that we don't try and read the other copies of this block, just
* return -EIO.
*/
if (found_level == 0 && btrfs_check_leaf(eb)) {
set_bit(EXTENT_BUFFER_CORRUPT, &eb->bflags);
ret = -EIO; ret = -EIO;
}
if (found_level > 0 && btrfs_check_node(eb)) if (found_level > 0 && btrfs_check_node(eb))
ret = -EIO; ret = -EIO;

View file

@ -3488,12 +3488,6 @@ int btrfs_free_tree_block(struct btrfs_trans_handle *trans,
trace_btrfs_reserved_extent_free(fs_info, buf->start, buf->len); trace_btrfs_reserved_extent_free(fs_info, buf->start, buf->len);
out: out:
/*
* Deleting the buffer, clear the corrupt flag since it doesn't
* matter anymore.
*/
clear_bit(EXTENT_BUFFER_CORRUPT, &buf->bflags);
return 0; return 0;
} }

View file

@ -38,7 +38,6 @@ struct btrfs_tree_parent_check;
enum { enum {
EXTENT_BUFFER_UPTODATE, EXTENT_BUFFER_UPTODATE,
EXTENT_BUFFER_DIRTY, EXTENT_BUFFER_DIRTY,
EXTENT_BUFFER_CORRUPT,
EXTENT_BUFFER_TREE_REF, EXTENT_BUFFER_TREE_REF,
EXTENT_BUFFER_STALE, EXTENT_BUFFER_STALE,
EXTENT_BUFFER_WRITEBACK, EXTENT_BUFFER_WRITEBACK,