Skip to content

Commit 0b9d62a

Browse files
Darrick J. Wongbrauner
authored andcommitted
fs: unlock the superblock during iterate_supers_type
This function takes super_lock in shared mode, so it should release the same lock. Cc: [email protected] # v6.16-rc1 Fixes: af7551c ("super: remove pointless s_root checks") Signed-off-by: "Darrick J. Wong" <[email protected]> Link: https://lore.kernel.org/20250611164044.GF6138@frogsfrogsfrogs Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 527c88d commit 0b9d62a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/super.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,8 +964,10 @@ void iterate_supers_type(struct file_system_type *type,
964964
spin_unlock(&sb_lock);
965965

966966
locked = super_lock_shared(sb);
967-
if (locked)
967+
if (locked) {
968968
f(sb, arg);
969+
super_unlock_shared(sb);
970+
}
969971

970972
spin_lock(&sb_lock);
971973
if (p)

0 commit comments

Comments
 (0)