From: Dominique Martinet <asmadeus@codewreck.org>
To: Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>,
Anand Jain <anand.jain@oracle.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Dominique Martinet <dominique.martinet@atmark-techno.com>,
Pavel Machek <pavel@denx.de>,
stable@vger.kernel.org
Subject: [PATCH] btrfs: add missing mutex_unlock in btrfs_relocate_sys_chunks()
Date: Fri, 19 Apr 2024 11:22:48 +0900 [thread overview]
Message-ID: <20240419-btrfs_unlock-v1-1-c3557976a691@codewreck.org> (raw)
From: Dominique Martinet <dominique.martinet@atmark-techno.com>
The previous patch forgot to unlock in the error path
Link: https://lore.kernel.org/all/Zh%2fHpAGFqa7YAFuM@duo.ucw.cz
Reported-by: Pavel Machek <pavel@denx.de>
Cc: stable@vger.kernel.org
Fixes: 7411055db5ce ("btrfs: handle chunk tree lookup error in btrfs_relocate_sys_chunks()")
Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
---
Note for stable: the mutex has been renamed from delete_unused_bgs_mutex
in 5.13, so the 5.10 and 4.19 backports need a trivial rename:
s/reclaim_bgs_lock/delete_unused_bgs_mutex/
If required I'll send branch-specific patches after this is merged.
---
fs/btrfs/volumes.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index f15591f3e54f..ef6bd2f4251b 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -3455,6 +3455,7 @@ static int btrfs_relocate_sys_chunks(struct btrfs_fs_info *fs_info)
* alignment and size).
*/
ret = -EUCLEAN;
+ mutex_unlock(&fs_info->reclaim_bgs_lock);
goto error;
}
---
base-commit: 2668e3ae2ef36d5e7c52f818ad7d90822c037de4
change-id: 20240419-btrfs_unlock-95e0b3e2e2fc
Best regards,
--
Dominique Martinet | Asmadeus
next reply other threads:[~2024-04-19 2:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-19 2:22 Dominique Martinet [this message]
2024-04-19 9:17 ` [PATCH] btrfs: add missing mutex_unlock in btrfs_relocate_sys_chunks() Pavel Machek
2024-04-23 14:38 ` David Sterba
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=20240419-btrfs_unlock-v1-1-c3557976a691@codewreck.org \
--to=asmadeus@codewreck.org \
--cc=anand.jain@oracle.com \
--cc=clm@fb.com \
--cc=dominique.martinet@atmark-techno.com \
--cc=dsterba@suse.com \
--cc=gregkh@linuxfoundation.org \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@denx.de \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox