Commit c61660ec authored by Daniel Vacek's avatar Daniel Vacek Committed by David Sterba
Browse files

btrfs: remove unused flag EXTENT_BUFFER_CORRUPT



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

Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Signed-off-by: default avatarDaniel Vacek <neelx@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 350362e9
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -224,7 +224,6 @@ int btrfs_read_extent_buffer(struct extent_buffer *eb,
	ASSERT(check);

	while (1) {
		clear_bit(EXTENT_BUFFER_CORRUPT, &eb->bflags);
		ret = read_extent_buffer_pages(eb, mirror_num, check);
		if (!ret)
			break;
@@ -452,15 +451,9 @@ int btrfs_validate_extent_buffer(struct extent_buffer *eb,
			goto out;
	}

	/*
	 * If this is a leaf block and it is corrupt, set the corrupt bit so
	 * 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);
	/* If this is a leaf block and it is corrupt, just return -EIO. */
	if (found_level == 0 && btrfs_check_leaf(eb))
		ret = -EIO;
	}

	if (found_level > 0 && btrfs_check_node(eb))
		ret = -EIO;
+0 −6
Original line number Diff line number Diff line
@@ -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);

out:

	/*
	 * Deleting the buffer, clear the corrupt flag since it doesn't
	 * matter anymore.
	 */
	clear_bit(EXTENT_BUFFER_CORRUPT, &buf->bflags);
	return 0;
}

+0 −1
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@ struct btrfs_tree_parent_check;
enum {
	EXTENT_BUFFER_UPTODATE,
	EXTENT_BUFFER_DIRTY,
	EXTENT_BUFFER_CORRUPT,
	EXTENT_BUFFER_TREE_REF,
	EXTENT_BUFFER_STALE,
	EXTENT_BUFFER_WRITEBACK,