linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nilfs2: simplify device handling
@ 2023-11-01 17:27 Jan Kara
  2023-11-02 10:27 ` Ryusuke Konishi
  2023-11-02 11:10 ` Christian Brauner
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Kara @ 2023-11-01 17:27 UTC (permalink / raw)
  To: Christian Brauner; +Cc: linux-fsdevel, Jan Kara, Ryusuke Konishi, linux-nilfs

We removed all codepaths where s_umount is taken beneath open_mutex and
bd_holder_lock so don't make things more complicated than they need to
be and hold s_umount over block device opening.

CC: Ryusuke Konishi <konishi.ryusuke@gmail.com>
CC: linux-nilfs@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/nilfs2/super.c | 8 --------
 1 file changed, 8 deletions(-)

Hi Christian, I think you've missed this simplification in your cleanup
patches. Can you merge it please?

diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index a5d1fa4e7552..df8674173b22 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -1314,15 +1314,7 @@ nilfs_mount(struct file_system_type *fs_type, int flags,
 		return ERR_CAST(s);
 
 	if (!s->s_root) {
-		/*
-		 * We drop s_umount here because we need to open the bdev and
-		 * bdev->open_mutex ranks above s_umount (blkdev_put() ->
-		 * __invalidate_device()). It is safe because we have active sb
-		 * reference and SB_BORN is not set yet.
-		 */
-		up_write(&s->s_umount);
 		err = setup_bdev_super(s, flags, NULL);
-		down_write(&s->s_umount);
 		if (!err)
 			err = nilfs_fill_super(s, data,
 					       flags & SB_SILENT ? 1 : 0);
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] nilfs2: simplify device handling
  2023-11-01 17:27 [PATCH] nilfs2: simplify device handling Jan Kara
@ 2023-11-02 10:27 ` Ryusuke Konishi
  2023-11-02 11:10 ` Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: Ryusuke Konishi @ 2023-11-02 10:27 UTC (permalink / raw)
  To: Jan Kara, Christian Brauner; +Cc: linux-fsdevel, linux-nilfs

On Thu, Nov 2, 2023 at 2:27 AM Jan Kara wrote:
>
> We removed all codepaths where s_umount is taken beneath open_mutex and
> bd_holder_lock so don't make things more complicated than they need to
> be and hold s_umount over block device opening.
>
> CC: Ryusuke Konishi <konishi.ryusuke@gmail.com>
> CC: linux-nilfs@vger.kernel.org
> Signed-off-by: Jan Kara <jack@suse.cz>
> ---
>  fs/nilfs2/super.c | 8 --------
>  1 file changed, 8 deletions(-)

Acked-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>

I had missed that cleanup patch set.  Thank you!

>
> Hi Christian, I think you've missed this simplification in your cleanup
> patches. Can you merge it please?

Thank you in advance, Christian.

Ryusuke Konishi

>
> diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
> index a5d1fa4e7552..df8674173b22 100644
> --- a/fs/nilfs2/super.c
> +++ b/fs/nilfs2/super.c
> @@ -1314,15 +1314,7 @@ nilfs_mount(struct file_system_type *fs_type, int flags,
>                 return ERR_CAST(s);
>
>         if (!s->s_root) {
> -               /*
> -                * We drop s_umount here because we need to open the bdev and
> -                * bdev->open_mutex ranks above s_umount (blkdev_put() ->
> -                * __invalidate_device()). It is safe because we have active sb
> -                * reference and SB_BORN is not set yet.
> -                */
> -               up_write(&s->s_umount);
>                 err = setup_bdev_super(s, flags, NULL);
> -               down_write(&s->s_umount);
>                 if (!err)
>                         err = nilfs_fill_super(s, data,
>                                                flags & SB_SILENT ? 1 : 0);
> --
> 2.35.3
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] nilfs2: simplify device handling
  2023-11-01 17:27 [PATCH] nilfs2: simplify device handling Jan Kara
  2023-11-02 10:27 ` Ryusuke Konishi
@ 2023-11-02 11:10 ` Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2023-11-02 11:10 UTC (permalink / raw)
  To: Jan Kara; +Cc: Christian Brauner, linux-fsdevel, Ryusuke Konishi, linux-nilfs

On Wed, 01 Nov 2023 18:27:39 +0100, Jan Kara wrote:
> We removed all codepaths where s_umount is taken beneath open_mutex and
> bd_holder_lock so don't make things more complicated than they need to
> be and hold s_umount over block device opening.
> 
> 

Ah, thank you, Jan. I missed nilfs indeed!

---

Applied to the vfs.super branch of the vfs/vfs.git tree.
Patches in the vfs.super 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.super

[1/1] nilfs2: simplify device handling
      https://git.kernel.org/vfs/vfs/c/c6a4738de282

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-02 11:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-01 17:27 [PATCH] nilfs2: simplify device handling Jan Kara
2023-11-02 10:27 ` Ryusuke Konishi
2023-11-02 11:10 ` Christian Brauner

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