* [PATCH] fs: unlock the superblock during iterate_supers_type
@ 2025-06-11 16:40 Darrick J. Wong
2025-06-12 10:09 ` Jan Kara
2025-06-12 12:27 ` Christian Brauner
0 siblings, 2 replies; 3+ messages in thread
From: Darrick J. Wong @ 2025-06-11 16:40 UTC (permalink / raw)
To: Christian Brauner; +Cc: linux-fsdevel, jack, linux-kernel
From: Darrick J. Wong <djwong@kernel.org>
This function takes super_lock in shared mode, so it should release the
same lock.
Cc: <stable@vger.kernel.org> # v6.16-rc1
Fixes: af7551cf13cf7f ("super: remove pointless s_root checks")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
fs/super.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/super.c b/fs/super.c
index 21799e213fd747..80418ca8e215bb 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -964,8 +964,10 @@ void iterate_supers_type(struct file_system_type *type,
spin_unlock(&sb_lock);
locked = super_lock_shared(sb);
- if (locked)
+ if (locked) {
f(sb, arg);
+ super_unlock_shared(sb);
+ }
spin_lock(&sb_lock);
if (p)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] fs: unlock the superblock during iterate_supers_type
2025-06-11 16:40 [PATCH] fs: unlock the superblock during iterate_supers_type Darrick J. Wong
@ 2025-06-12 10:09 ` Jan Kara
2025-06-12 12:27 ` Christian Brauner
1 sibling, 0 replies; 3+ messages in thread
From: Jan Kara @ 2025-06-12 10:09 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Christian Brauner, linux-fsdevel, jack, linux-kernel
On Wed 11-06-25 09:40:44, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> This function takes super_lock in shared mode, so it should release the
> same lock.
>
> Cc: <stable@vger.kernel.org> # v6.16-rc1
> Fixes: af7551cf13cf7f ("super: remove pointless s_root checks")
> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Indeed that was an oversight. Thanks for catching it! Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> fs/super.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/super.c b/fs/super.c
> index 21799e213fd747..80418ca8e215bb 100644
> --- a/fs/super.c
> +++ b/fs/super.c
> @@ -964,8 +964,10 @@ void iterate_supers_type(struct file_system_type *type,
> spin_unlock(&sb_lock);
>
> locked = super_lock_shared(sb);
> - if (locked)
> + if (locked) {
> f(sb, arg);
> + super_unlock_shared(sb);
> + }
>
> spin_lock(&sb_lock);
> if (p)
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fs: unlock the superblock during iterate_supers_type
2025-06-11 16:40 [PATCH] fs: unlock the superblock during iterate_supers_type Darrick J. Wong
2025-06-12 10:09 ` Jan Kara
@ 2025-06-12 12:27 ` Christian Brauner
1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2025-06-12 12:27 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Christian Brauner, linux-fsdevel, jack, linux-kernel
On Wed, 11 Jun 2025 09:40:44 -0700, Darrick J. Wong wrote:
> This function takes super_lock in shared mode, so it should release the
> same lock.
>
>
https://youtu.be/m6uvv1aS5_I?si=8e0DYW802X30y2UM&t=224
---
Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes
[1/1] fs: unlock the superblock during iterate_supers_type
https://git.kernel.org/vfs/vfs/c/0b9d62a47149
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-12 12:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-11 16:40 [PATCH] fs: unlock the superblock during iterate_supers_type Darrick J. Wong
2025-06-12 10:09 ` Jan Kara
2025-06-12 12:27 ` Christian Brauner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox