btrfs: Move free_pages_out label in inline extent handling branch in compress_file_range

[ Upstream commit cecc8d9038 ]

This label is only executed if compress_file_range fails to create an
inline extent. So move its code in the semantically related inline
extent handling branch. No functional changes.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Nikolay Borisov
2019-07-17 14:41:45 +03:00
committed by Greg Kroah-Hartman
parent f50a0abaf3
commit 2a3d84f1c2

View File

@@ -628,7 +628,14 @@ cont:
PAGE_SET_WRITEBACK |
page_error_op |
PAGE_END_WRITEBACK);
goto free_pages_out;
for (i = 0; i < nr_pages; i++) {
WARN_ON(pages[i]->mapping);
put_page(pages[i]);
}
kfree(pages);
return;
}
}
@@ -706,13 +713,6 @@ cleanup_and_bail_uncompressed:
*num_added += 1;
return;
free_pages_out:
for (i = 0; i < nr_pages; i++) {
WARN_ON(pages[i]->mapping);
put_page(pages[i]);
}
kfree(pages);
}
static void free_async_extent_pages(struct async_extent *async_extent)