Liu Bo
baf863b9c2
Btrfs: fix eb memory leak due to readpage failure
...
eb->io_pages is set in read_extent_buffer_pages().
In case of readpage failure, for pages that have been added to bio,
it calls bio_endio and later readpage_io_failed_hook() does the work.
When this eb's page (couldn't be the 1st page) fails to add itself to bio
due to failure in merge_bio(), it cannot decrease eb->io_pages via bio_endio,
and ends up with a memory leak eventually.
This lets __do_readpage propagate errors to callers and adds the
'atomic_dec(&eb->io_pages)'.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-26 13:52:25 +02:00
..
2016-06-23 10:44:39 -07:00
2016-07-26 13:52:25 +02:00
2016-01-25 16:50:26 -08:00
2015-08-31 11:46:40 -07:00
2016-07-26 13:52:25 +02:00
2016-05-25 22:51:03 +02:00
2016-06-17 18:32:40 +02:00
2016-07-26 13:52:25 +02:00
2016-03-11 17:12:46 +01:00
2016-07-26 13:52:25 +02:00
2016-07-07 18:45:53 +02:00
2016-07-26 13:52:25 +02:00
2016-07-26 13:52:25 +02:00
2016-06-25 06:20:10 -07:00
2016-07-26 13:52:25 +02:00
2016-05-25 22:35:14 +02:00
2016-05-25 22:51:03 +02:00
2016-04-28 10:59:13 +02:00
2016-07-26 13:52:25 +02:00
2016-06-02 19:23:14 +02:00
2015-10-06 06:55:23 -07:00
2016-07-26 13:52:25 +02:00
2016-06-02 19:23:14 +02:00
2016-07-26 13:52:25 +02:00
2016-01-15 19:22:28 +01:00
2016-07-26 13:52:25 +02:00
2016-04-29 11:01:47 +02:00
2016-07-26 13:52:25 +02:00
2016-06-02 19:23:14 +02:00
2016-05-25 22:35:14 +02:00
2016-01-29 08:19:37 -08:00
2015-12-17 12:16:47 -08:00
2016-06-06 14:08:28 +02:00
2016-06-06 14:08:28 +02:00
2016-04-28 10:36:54 +02:00
2016-04-04 10:41:08 -07:00
2016-01-15 19:25:02 +01:00
2016-07-26 13:52:25 +02:00
2016-05-27 17:14:05 -07:00
2016-01-07 14:30:52 +01:00
2016-04-04 10:41:08 -07:00
2015-12-17 12:16:47 -08:00
2016-07-26 13:52:25 +02:00
2016-05-30 12:58:21 +01:00
2016-02-11 16:15:43 +01:00
2016-03-11 17:12:46 +01:00
2016-05-25 22:35:14 +02:00
2015-10-21 18:41:10 -07:00
2016-05-25 22:35:14 +02:00
2015-08-09 07:34:26 -07:00
2016-05-30 12:58:18 +01:00
2016-07-26 13:52:25 +02:00
2016-05-25 22:51:03 +02:00
2016-07-26 13:52:25 +02:00
2016-05-25 22:51:03 +02:00
2016-01-07 14:38:02 +01:00
2016-05-25 22:35:14 +02:00
2016-06-17 18:32:40 +02:00
2016-07-26 13:52:25 +02:00
2016-01-21 18:50:40 +01:00
2016-06-22 17:54:18 -07:00
2016-06-17 18:32:40 +02:00
2015-12-18 02:51:32 +00:00
2016-07-26 13:52:25 +02:00
2016-03-01 08:23:25 -08:00
2016-05-25 22:35:14 +02:00
2015-06-10 09:26:17 -07:00
2016-07-26 13:52:25 +02:00
2016-05-16 15:46:29 +02:00
2016-05-27 15:39:43 -04:00
2016-05-17 19:17:09 -04:00
2016-04-04 10:41:08 -07:00