On Tue 17-10-23 20:48:23, Christoph Hellwig wrote: > From: Christian Brauner <brauner@xxxxxxxxxx> > > With recent block level changes we should never be in a situation where > we hold disk->open_mutex when calling into these helpers. So assert that > in the code. > > Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx> > Signed-off-by: Christoph Hellwig <hch@xxxxxx> Looks good to me. Feel free to add: Reviewed-by: Jan Kara <jack@xxxxxxx> Honza > --- > fs/super.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/super.c b/fs/super.c > index 26b96191e9b3ca..ce54cfcecaa156 100644 > --- a/fs/super.c > +++ b/fs/super.c > @@ -1443,6 +1443,7 @@ static void fs_bdev_mark_dead(struct block_device *bdev, bool surprise) > > /* bd_holder_lock ensures that the sb isn't freed */ > lockdep_assert_held(&bdev->bd_holder_lock); > + lockdep_assert_not_held(&bdev->bd_disk->open_mutex); > > if (!super_lock_shared_active(sb)) > return; > @@ -1462,6 +1463,7 @@ static void fs_bdev_sync(struct block_device *bdev) > struct super_block *sb = bdev->bd_holder; > > lockdep_assert_held(&bdev->bd_holder_lock); > + lockdep_assert_not_held(&bdev->bd_disk->open_mutex); > > if (!super_lock_shared_active(sb)) > return; > -- > 2.39.2 > -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR