aboutsummaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r--fs/block_dev.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 69a5b6fbee2b..afe74dda632b 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -25,7 +25,6 @@
25#include <linux/uio.h> 25#include <linux/uio.h>
26#include <linux/namei.h> 26#include <linux/namei.h>
27#include <linux/log2.h> 27#include <linux/log2.h>
28#include <linux/kmemleak.h>
29#include <linux/cleancache.h> 28#include <linux/cleancache.h>
30#include <asm/uaccess.h> 29#include <asm/uaccess.h>
31#include "internal.h" 30#include "internal.h"
@@ -521,7 +520,7 @@ static struct super_block *blockdev_superblock __read_mostly;
521void __init bdev_cache_init(void) 520void __init bdev_cache_init(void)
522{ 521{
523 int err; 522 int err;
524 struct vfsmount *bd_mnt; 523 static struct vfsmount *bd_mnt;
525 524
526 bdev_cachep = kmem_cache_create("bdev_cache", sizeof(struct bdev_inode), 525 bdev_cachep = kmem_cache_create("bdev_cache", sizeof(struct bdev_inode),
527 0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT| 526 0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
@@ -533,12 +532,7 @@ void __init bdev_cache_init(void)
533 bd_mnt = kern_mount(&bd_type); 532 bd_mnt = kern_mount(&bd_type);
534 if (IS_ERR(bd_mnt)) 533 if (IS_ERR(bd_mnt))
535 panic("Cannot create bdev pseudo-fs"); 534 panic("Cannot create bdev pseudo-fs");
536 /* 535 blockdev_superblock = bd_mnt->mnt_sb; /* For writeback */
537 * This vfsmount structure is only used to obtain the
538 * blockdev_superblock, so tell kmemleak not to report it.
539 */
540 kmemleak_not_leak(bd_mnt);
541 blockdev_superblock = bd_mnt->mnt_sb; /* For writeback */
542} 536}
543 537
544/* 538/*