diff options
author | Goldwyn Rodrigues <[email protected]> | 2023-07-14 10:18:19 -0500 |
---|---|---|
committer | David Sterba <[email protected]> | 2023-08-21 14:52:13 +0200 |
commit | 75d305c55b130bae5077ec262440240fec4e6281 (patch) | |
tree | 10d3fd8edefe8c9079551db3860cf1b66230103d | |
parent | 52ea5bfbfa6d5432ed46e0a18b9e5ca4e4f91852 (diff) |
btrfs: remove duplicate free_async_extent_pages() on reservation error
While performing compressed writes, if the extent reservation fails, the
async extent pages are first freed in the error check for return value
ret, and then again at out_free label.
Remove the first call to free_async_extent_pages().
Reviewed-by: Josef Bacik <[email protected]>
Signed-off-by: Goldwyn Rodrigues <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
-rw-r--r-- | fs/btrfs/inode.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index aa090b0b5d29..5508597be614 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1217,7 +1217,6 @@ static int submit_one_async_extent(struct btrfs_inode *inode, async_extent->compressed_size, 0, *alloc_hint, &ins, 1, 1); if (ret) { - free_async_extent_pages(async_extent); /* * Here we used to try again by going back to non-compressed * path for ENOSPC. But we can't reserve space even for |