Browse Source

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 <chris.mason@oracle.com>
Chris Mason 13 năm trước cách đây
mục cha
commit
c674e04e1c
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      fs/btrfs/disk-io.c

+ 1 - 0
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 */