Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125007
b: refs/heads/master
c: c2acf7b
h: refs/heads/master
i:
  125005: 4642a88
  125003: 8d8bdcc
  124999: 8e6e824
  124991: b320c09
v: v3
  • Loading branch information
Denis ChengRq authored and Al Viro committed Dec 31, 2008
1 parent d011090 commit a8cf452
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6badd79bd002788aaec27b50a74ab69ef65ab8ee
refs/heads/master: c2acf7b90821785fe812cc0aa05148e5a1f84204
9 changes: 5 additions & 4 deletions trunk/fs/block_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,13 @@ static struct file_system_type bd_type = {
.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),
Expand Down Expand Up @@ -373,7 +374,7 @@ struct block_device *bdget(dev_t dev)
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)
Expand Down Expand Up @@ -463,7 +464,7 @@ void bd_forget(struct inode *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);
}
Expand Down

0 comments on commit a8cf452

Please sign in to comment.