On Wed, Jun 07, 2023 at 08:24:01PM -0700, Luis Chamberlain wrote: > -extern struct super_block *blockdev_superblock; > static inline bool sb_is_blkdev_sb(struct super_block *sb) > { > - return IS_ENABLED(CONFIG_BLOCK) && sb == blockdev_superblock; > + return IS_ENABLED(CONFIG_BLOCK) && sb->s_magic == BDEVFS_MAGIC; > } So while I'd love to be able to make blockdev_superblock, I think the existing code is the better idea here. BDEVFS_MAGIC can easily end up in any other s_magic as it's a free-form field. blockdev_superblock can't accidentally have the same address as a random non-bdev sb.