Commit c674e04e authored by Chris Mason's avatar Chris Mason

Btrfs: fix extent_buffer leak in the metadata IO error handling

The scrub readahead branch brought in a new error handling hook,
but it was leaking extent_buffer references.
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 740c3d22
...@@ -644,6 +644,7 @@ static int btree_io_failed_hook(struct bio *failed_bio, ...@@ -644,6 +644,7 @@ static int btree_io_failed_hook(struct bio *failed_bio,
clear_bit(EXTENT_BUFFER_READAHEAD, &eb->bflags); clear_bit(EXTENT_BUFFER_READAHEAD, &eb->bflags);
btree_readahead_hook(root, eb, eb->start, -EIO); btree_readahead_hook(root, eb, eb->start, -EIO);
} }
free_extent_buffer(eb);
out: out:
return -EIO; /* we fixed nothing */ return -EIO; /* we fixed nothing */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment