diff options
author | Josef Bacik <josef@toxicpanda.com> | 2020-02-27 16:12:46 -0500 |
---|---|---|
committer | Josef Bacik <josef@toxicpanda.com> | 2020-02-27 16:12:46 -0500 |
commit | 1bfc23d8eae41161821513a48703ed38d6fd0cff (patch) | |
tree | 29315e85625eb2759a77b5b0deae38d8346286f8 | |
parent | 161c59d18c69947d6feac7181c5bccb7e5d2dc27 (diff) | |
download | btrfs-next-1bfc23d8eae41161821513a48703ed38d6fd0cff.tar.gz |
btrfs: drop block from cache on error in relocation
If we have an error while building the backref tree in relocation we'll
process all the pending edges and then free the node. This isn't quite
right however as the node could be integrated into the existing cache
partially, linking children within itself into the cache, but not
properly linked into the cache itself. The fix for this is simple, use
remove_backref_node() instead of free_backref_node(), which will clean
up the cache related to this node completely.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
-rw-r--r-- | fs/btrfs/relocation.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 4fb7e3cc2aca05..507361e9931658 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -1244,7 +1244,7 @@ out: free_backref_node(cache, lower); } - free_backref_node(cache, node); + remove_backref_node(cache, node); return ERR_PTR(err); } ASSERT(!node || !node->detached); |