Message ID | p6swvbl7oht2xiz7nrw3iexpa5ytuqdhbwneqm3phcm5igejd3@ao2eyoslwbdj (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs: remove duplicate free_async_extent_pages() on reservation error | expand |
On Fri, Jul 14, 2023 at 10:18:19AM -0500, Goldwyn Rodrigues wrote: > While performing compressed writes, if the extent reservation fails, the > async extent pages are first free'd in the error check for return value > ret, and then again at "goto out_free". > > Remove the first call to free_async_extent_pages(). > > Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com> > Reviewed-by: Josef Bacik <josef@toxicpanda.com> Thanks, Josef
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index dbbb67293e34..cb742242ce26 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
While performing compressed writes, if the extent reservation fails, the async extent pages are first free'd in the error check for return value ret, and then again at "goto out_free". Remove the first call to free_async_extent_pages(). Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>