On Wed, Aug 02, 2023 at 09:32:19AM -0700, Darrick J. Wong wrote:
> > +   /* see get_tree_bdev why this is needed and safe */
> 
> Which part of get_tree_bdev?  Is it this?
> 
>               /*
>                * s_umount nests inside open_mutex during
>                * __invalidate_device().  blkdev_put() acquires
>                * open_mutex and can't be called under s_umount.  Drop
>                * s_umount temporarily.  This is safe as we're
>                * holding an active reference.
>                */
>               up_write(&s->s_umount);
>               blkdev_put(bdev, fc->fs_type);
>               down_write(&s->s_umount);

Yes.  With the refactoring earlier in the series get_tree_bdev should
be trivial enough to not need a more specific reference.  If you
think there's a better way to refer to it I can update the comment,
though.

> >             mp->m_logdev_targp = mp->m_ddev_targp;
> >     }
> >  
> > -   return 0;
> > +   error = 0;
> > +out_unlock:
> > +   down_write(&sb->s_umount);
> 
> Isn't down_write taking s_umount?  I think the label should be
> out_relock or something less misleading.

Agreed.  Christian, can you just change this in your branch, or should
I send an incremental patch?



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to