[PATCH] Free the temporary vfsmount created in bdev_cache_init()

From: Catalin Marinas
Date: Wed Jan 14 2009 - 06:42:11 EST


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 <catalin.marinas@xxxxxxx>
Acked-by: Cheng Renquan <crquan@xxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---
fs/block_dev.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/block_dev.c b/fs/block_dev.c
index b3c1eff..5124756 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -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);
}

/*

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/