Free the temporary vfsmount created in bdev_cache_init()
PATCH 1/1 Free the temporary vfsmount created in bdev_cache_init()
The vfsmount structure allocated in this function (the bd_mnt local variable) is only used to obtain the blockdev_superblock and there are no other references to it. This structure can be safely freed.
Signed-off-by Catalin Marinas <[email protected]>
Acked-by Cheng Renquan <[email protected]>
Cc Andrew Morton <[email protected]>
--- fs/block_dev.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
fs/block_dev.c +1 -0
@@ -346,6 +346,7 @@ void __init bdev_cache_init(void)if (IS_ERR (bd_mnt))panic ("Cannot create bdev pseudo-fs" ); blockdev_superblock = bd_mnt->mnt_sb;/* For writeback */ +free_vfsmnt (bd_mnt); }/*