fs: unlock the superblock during iterate_supers_type
PATCH 1/1 fs: unlock the superblock during iterate_supers_type
From: Darrick J. Wong <[email protected]>
This function takes super_lock in shared mode, so it should release the same lock.
--- fs/super.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fs/super.c +3 -1
@@ -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)
Quoted 8 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
This function takes
super_lockin shared mode, so it should release the same lock.Cc <[email protected]> # v6.16-rc1Fixes af7551cf13cf7f ("super: remove pointless s_root checks")Signed-off-by "Darrick J. Wong" <[email protected]>
Indeed that was an oversight. Thanks for catching it! Feel free to add:
Honza
Quoted 20 lines
--- fs/super.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)fs/super.c +3
-1@@ -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)
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Quoted 4 lines · Darrick J. Wong
This function takes
super_lockin 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