From: Chris Mason Date: Fri, 4 Nov 2011 02:23:13 +0000 (-0400) Subject: Btrfs: fix extent_buffer leak in the metadata IO error handling X-Git-Tag: v3.12-rc1~4220^2~60 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c674e04e1cd6049715e7b9446790f4b441e547c0;p=kernel%2Fkernel-generic.git 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: Chris Mason --- diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 0eb1f09..40a62b9 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -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 */