linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@lst.de>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH RFC 1/6] fs: simplify setup_bdev_super() calls
Date: Wed, 25 Oct 2023 17:29:14 +0200	[thread overview]
Message-ID: <20231025152914.fin2hzzywox5ijtk@quack3> (raw)
In-Reply-To: <20231024-vfs-super-rework-v1-1-37a8aa697148@kernel.org>

On Tue 24-10-23 16:53:39, Christian Brauner wrote:
> There's no need to drop s_umount anymore now that we removed all sources
> where s_umount is taken beneath open_mutex or bd_holder_lock.
> 
> Signed-off-by: Christian Brauner <brauner@kernel.org>

Yay. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/super.c | 16 ----------------
>  1 file changed, 16 deletions(-)
> 
> diff --git a/fs/super.c b/fs/super.c
> index b26b302f870d..4edde92d5e8f 100644
> --- a/fs/super.c
> +++ b/fs/super.c
> @@ -1613,15 +1613,7 @@ int get_tree_bdev(struct fs_context *fc,
>  			return -EBUSY;
>  		}
>  	} else {
> -		/*
> -		 * We drop s_umount here because we need to open the bdev and
> -		 * bdev->open_mutex ranks above s_umount (blkdev_put() ->
> -		 * bdev_mark_dead()). It is safe because we have active sb
> -		 * reference and SB_BORN is not set yet.
> -		 */
> -		super_unlock_excl(s);
>  		error = setup_bdev_super(s, fc->sb_flags, fc);
> -		__super_lock_excl(s);
>  		if (!error)
>  			error = fill_super(s, fc);
>  		if (error) {
> @@ -1665,15 +1657,7 @@ struct dentry *mount_bdev(struct file_system_type *fs_type,
>  			return ERR_PTR(-EBUSY);
>  		}
>  	} else {
> -		/*
> -		 * We drop s_umount here because we need to open the bdev and
> -		 * bdev->open_mutex ranks above s_umount (blkdev_put() ->
> -		 * bdev_mark_dead()). It is safe because we have active sb
> -		 * reference and SB_BORN is not set yet.
> -		 */
> -		super_unlock_excl(s);
>  		error = setup_bdev_super(s, flags, NULL);
> -		__super_lock_excl(s);
>  		if (!error)
>  			error = fill_super(s, data, flags & SB_SILENT ? 1 : 0);
>  		if (error) {
> 
> -- 
> 2.34.1
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2023-10-25 15:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-24 14:53 [PATCH RFC 0/6] fs,block: yield devices Christian Brauner
2023-10-24 14:53 ` [PATCH RFC 1/6] fs: simplify setup_bdev_super() calls Christian Brauner
2023-10-25 15:29   ` Jan Kara [this message]
2023-10-27  6:42   ` Christoph Hellwig
2023-10-24 14:53 ` [PATCH RFC 2/6] xfs: simplify device handling Christian Brauner
2023-10-25 15:30   ` Jan Kara
2023-10-27  6:42   ` Christoph Hellwig
2023-10-24 14:53 ` [PATCH RFC 3/6] ext4: " Christian Brauner
2023-10-25 15:30   ` Jan Kara
2023-10-27  6:42   ` Christoph Hellwig
2023-10-24 14:53 ` [PATCH RFC 4/6] bdev: simplify waiting for concurrent claimers Christian Brauner
2023-10-25 15:54   ` Jan Kara
2023-10-27  7:21     ` Christoph Hellwig
2023-10-24 14:53 ` [PATCH RFC 5/6] block: mark device as about to be released Christian Brauner
2023-10-24 14:53 ` [PATCH RFC 6/6] fs: add ->yield_devices() Christian Brauner
2023-10-25 17:20 ` [PATCH RFC 0/6] fs,block: yield devices Jan Kara
2023-10-25 20:46   ` Christian Brauner
2023-10-26 10:35     ` Jan Kara
2023-10-26 12:07       ` Christian Brauner
2023-10-26 13:04         ` Jan Kara
2023-10-26 15:08           ` Christian Brauner
2023-10-26 15:58             ` Jan Kara
2023-10-27  7:24             ` Christoph Hellwig
2023-10-26 11:50 ` (subset) " Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231025152914.fin2hzzywox5ijtk@quack3 \
    --to=jack@suse.cz \
    --cc=brauner@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).