Skip to content

Commit

Permalink
Btrfs: fix extent_buffer leak in the metadata IO error handling
Browse files Browse the repository at this point in the history
The scrub readahead branch brought in a new error handling hook,
but it was leaking extent_buffer references.

Signed-off-by: Chris Mason <[email protected]>
  • Loading branch information
chrismason-xx committed Nov 6, 2011
1 parent 740c3d2 commit c674e04
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ static int btree_io_failed_hook(struct bio *failed_bio,
clear_bit(EXTENT_BUFFER_READAHEAD, &eb->bflags);
btree_readahead_hook(root, eb, eb->start, -EIO);
}
free_extent_buffer(eb);

out:
return -EIO; /* we fixed nothing */
Expand Down

0 comments on commit c674e04

Please sign in to comment.