aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Brauner <[email protected]>2023-10-17 20:48:23 +0200
committerChristian Brauner <[email protected]>2023-10-28 13:29:23 +0200
commit3b224e1df650df22541724c4bd5f1622b40d4ba4 (patch)
tree102ebb7206ba366d56667dfdbed4e2ee346bf649
parentf61033390bc34cd22ad4b4c12619a1e7a8a75600 (diff)
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ming Lei <[email protected]> Reviewed-by: Jan Kara <[email protected]> Reviewed-by: Jens Axboe <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
-rw-r--r--fs/super.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/super.c b/fs/super.c
index 799b8db1931e..c7b452e12e4c 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1433,6 +1433,7 @@ static struct super_block *bdev_super_lock_shared(struct block_device *bdev)
lockdep_assert_held(&bdev->bd_holder_lock);
lockdep_assert_not_held(&sb->s_umount);
+ lockdep_assert_not_held(&bdev->bd_disk->open_mutex);
/* Make sure sb doesn't go away from under us */
spin_lock(&sb_lock);