fs: unlock the superblock during iterate_supers_type

This function takes super_lock in shared mode, so it should release the
same lock.

Cc: stable@vger.kernel.org # v6.16-rc1
Fixes: af7551cf13 ("super: remove pointless s_root checks")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Link: https://lore.kernel.org/20250611164044.GF6138@frogsfrogsfrogs
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Darrick J. Wong 2025-06-11 09:40:44 -07:00 committed by Christian Brauner
parent 527c88d839
commit 0b9d62a471
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2

View File

@ -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)