.kill_sb = kill_anon_super,
};
-static struct vfsmount *bd_mnt __read_mostly;
-struct super_block *blockdev_superblock;
+struct super_block *blockdev_superblock __read_mostly;
void __init bdev_cache_init(void)
{
int err;
+ struct vfsmount *bd_mnt;
+
bdev_cachep = kmem_cache_create("bdev_cache", sizeof(struct bdev_inode),
0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
SLAB_MEM_SPREAD|SLAB_PANIC),
struct block_device *bdev;
struct inode *inode;
- inode = iget5_locked(bd_mnt->mnt_sb, hash(dev),
+ inode = iget5_locked(blockdev_superblock, hash(dev),
bdev_test, bdev_set, &dev);
if (!inode)
spin_lock(&bdev_lock);
if (inode->i_bdev) {
- if (inode->i_sb != blockdev_superblock)
+ if (!sb_is_blkdev_sb(inode->i_sb))
bdev = inode->i_bdev;
__bd_forget(inode);
}