From: Goldwyn Rodrigues <rgoldwyn@suse.de>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH] btrfs: remove duplicate free_async_extent_pages() on reservation error
Date: Fri, 14 Jul 2023 10:18:19 -0500 [thread overview]
Message-ID: <p6swvbl7oht2xiz7nrw3iexpa5ytuqdhbwneqm3phcm5igejd3@ao2eyoslwbdj> (raw)
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>
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
--
Goldwyn
next reply other threads:[~2023-07-14 15:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-14 15:18 Goldwyn Rodrigues [this message]
2023-07-17 14:08 ` [PATCH] btrfs: remove duplicate free_async_extent_pages() on reservation error Josef Bacik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=p6swvbl7oht2xiz7nrw3iexpa5ytuqdhbwneqm3phcm5igejd3@ao2eyoslwbdj \
--to=rgoldwyn@suse.de \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.