[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bzvydikjge7rbzcm4r4wani53cywrzmokcknbf6mty5uwjsxgw@2j4crkt3tpfu>
Date: Thu, 12 Jun 2025 12:09:23 +0200
From: Jan Kara <jack@...e.cz>
To: "Darrick J. Wong" <djwong@...nel.org>
Cc: Christian Brauner <brauner@...nel.org>, linux-fsdevel@...r.kernel.org,
jack@...e.cz, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs: unlock the superblock during iterate_supers_type
On Wed 11-06-25 09:40:44, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@...nel.org>
>
> This function takes super_lock in shared mode, so it should release the
> same lock.
>
> Cc: <stable@...r.kernel.org> # v6.16-rc1
> Fixes: af7551cf13cf7f ("super: remove pointless s_root checks")
> Signed-off-by: "Darrick J. Wong" <djwong@...nel.org>
Indeed that was an oversight. Thanks for catching it! Feel free to add:
Reviewed-by: Jan Kara <jack@...e.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@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists