Re: [PATCH] nilfs2: simplify device handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> CC: linux-nilfs@xxxxxxxxxxxxxxx
> Signed-off-by: Jan Kara <jack@xxxxxxx>
> ---
>  fs/nilfs2/super.c | 8 --------
>  1 file changed, 8 deletions(-)

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

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
>





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux