diff options
author | 2019-07-17 14:41:45 +0300 | |
---|---|---|
committer | 2019-09-09 14:58:59 +0200 | |
commit | cecc8d9038d164eda61fbcd72520975a554ea63e (patch) | |
tree | c0969bb5ea095ad783fd17206b4c36bd80913a68 | |
parent | btrfs: Return number of compressed extents directly in compress_file_range (diff) | |
download | wireguard-linux-cecc8d9038d164eda61fbcd72520975a554ea63e.tar.xz wireguard-linux-cecc8d9038d164eda61fbcd72520975a554ea63e.zip |
btrfs: Move free_pages_out label in inline extent handling branch in compress_file_range
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>
-rw-r--r-- | fs/btrfs/inode.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index db814f555b26..385127ab0841 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -622,7 +622,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 0; } } @@ -700,15 +707,6 @@ cleanup_and_bail_uncompressed: compressed_extents++; return compressed_extents; - -free_pages_out: - for (i = 0; i < nr_pages; i++) { - WARN_ON(pages[i]->mapping); - put_page(pages[i]); - } - kfree(pages); - - return 0; } static void free_async_extent_pages(struct async_extent *async_extent) |