Skip to content

Commit 3b224e1

Browse files
committed
fs: assert that open_mutex isn't held over holder ops
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: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20231017184823.1383356-6-hch@lst.de Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent f610333 commit 3b224e1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,6 +1433,7 @@ static struct super_block *bdev_super_lock_shared(struct block_device *bdev)
14331433

14341434
lockdep_assert_held(&bdev->bd_holder_lock);
14351435
lockdep_assert_not_held(&sb->s_umount);
1436+
lockdep_assert_not_held(&bdev->bd_disk->open_mutex);
14361437

14371438
/* Make sure sb doesn't go away from under us */
14381439
spin_lock(&sb_lock);

0 commit comments

Comments
 (0)