Filipe Manana
a52e24c7fc
btrfs: fix inode list leak during backref walking at resolve_indirect_refs()
...
[ Upstream commit 5614dc3a47e3310fbc77ea3b67eaadd1c6417bf1 ]
During backref walking, at resolve_indirect_refs(), if we get an error
we jump to the 'out' label and call ulist_free() on the 'parents' ulist,
which frees all the elements in the ulist - however that does not free
any inode lists that may be attached to elements, through the 'aux' field
of a ulist node, so we end up leaking lists if we have any attached to
the unodes.
Fix this by calling free_leaf_list() instead of ulist_free() when we exit
from resolve_indirect_refs(). The static function free_leaf_list() is
moved up for this to be possible and it's slightly simplified by removing
unnecessary code.
Fixes: 3301958b7c
("Btrfs: add inodes before dropping the extent lock in find_all_leafs")
Signed-off-by: Filipe Manana <fdmanana@suse.com >
Signed-off-by: David Sterba <dsterba@suse.com >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2022-11-10 18:14:19 +01:00
..
2020-11-13 22:15:59 +01:00
2019-04-29 19:02:44 +02:00
2021-11-26 10:39:20 +01:00
2020-03-23 17:01:51 +01:00
2022-11-10 18:14:19 +01:00
2021-03-04 11:38:29 +01:00
2022-08-21 15:16:20 +02:00
2021-03-09 11:11:11 +01:00
2020-11-05 13:02:05 +01:00
2020-03-23 17:01:55 +01:00
2021-09-03 10:09:28 +02:00
2020-07-27 12:55:21 +02:00
2020-03-23 17:01:39 +01:00
2021-08-04 12:46:39 +02:00
2020-10-07 12:06:55 +02:00
2022-01-27 10:54:27 +01:00
2021-03-09 11:11:11 +01:00
2020-10-07 12:06:52 +02:00
2020-07-27 12:55:36 +02:00
2021-07-14 16:55:55 +02:00
2020-03-23 17:01:53 +01:00
2021-03-04 11:38:30 +01:00
2021-03-04 11:38:30 +01:00
2022-08-31 17:15:22 +02:00
2019-11-18 12:46:52 +01:00
2019-04-29 19:02:50 +02:00
2021-01-19 18:27:24 +01:00
2020-04-20 17:43:42 +02:00
2022-10-05 10:38:37 +02:00
2020-10-26 15:04:57 +01:00
2020-05-25 11:25:37 +02:00
2020-03-23 17:01:42 +01:00
2021-12-14 11:32:38 +01:00
2022-04-13 21:01:08 +02:00
2020-02-12 17:16:46 +01:00
2019-11-18 23:43:44 +01:00
2020-10-07 12:13:25 +02:00
2021-10-20 11:44:59 +02:00
2021-10-09 14:40:56 +02:00
2022-04-20 09:23:19 +02:00
2021-03-09 11:11:11 +01:00
2020-07-27 12:55:21 +02:00
2021-02-03 23:28:40 +01:00
2019-11-18 17:51:51 +01:00
2019-09-09 14:59:16 +02:00
2020-07-27 12:55:36 +02:00
2018-04-12 16:29:46 +02:00
2022-07-21 21:20:01 +02:00
2022-02-01 17:25:48 +01:00
2021-07-14 16:55:56 +02:00
2020-10-07 12:12:16 +02:00
2020-10-07 12:12:17 +02:00
2019-11-18 12:46:59 +01:00
2020-03-23 17:01:54 +01:00
2020-05-25 11:25:19 +02:00
2020-10-07 12:13:22 +02:00
2020-10-07 12:13:22 +02:00
2018-04-12 16:29:51 +02:00
2021-01-27 11:55:06 +01:00
2021-01-27 11:55:06 +01:00
2020-05-25 11:25:37 +02:00
2019-04-29 19:02:54 +02:00
2022-10-26 13:25:12 +02:00
2021-03-11 14:17:22 +01:00
2022-08-21 15:16:27 +02:00
2019-07-01 13:34:58 +02:00
2020-03-23 17:01:53 +01:00
2020-10-26 15:03:59 +01:00
2020-11-05 13:03:39 +01:00
2019-04-29 19:02:49 +02:00
2022-04-08 14:40:04 +02:00
2020-03-23 17:01:54 +01:00
2021-05-11 14:47:22 +02:00
2022-08-31 17:15:21 +02:00
2022-10-26 13:25:51 +02:00
2022-02-23 12:00:58 +01:00
2020-10-07 12:13:17 +02:00
2021-09-30 10:11:00 +02:00
2021-03-04 11:38:30 +01:00
2020-10-07 12:13:23 +02:00
2022-06-29 08:59:45 +02:00
2021-07-14 16:55:55 +02:00
2020-10-07 12:12:21 +02:00
2021-07-14 16:55:40 +02:00
2021-09-03 10:09:28 +02:00
2022-03-02 11:42:45 +01:00
2019-04-29 19:02:39 +02:00
2020-07-27 12:55:28 +02:00
2022-08-25 11:37:51 +02:00
2020-10-07 12:06:56 +02:00
2018-04-12 16:29:51 +02:00
2018-04-12 16:29:46 +02:00
2020-05-25 11:25:36 +02:00
2022-09-08 11:11:40 +02:00
2021-02-03 23:28:40 +01:00
2022-08-31 17:15:22 +02:00
2019-04-29 19:02:44 +02:00
2020-01-31 10:30:40 -08:00
2019-11-18 12:46:59 +01:00