[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090401110703.12974.99902.stgit@pc1117.cambridge.arm.com>
Date: Wed, 01 Apr 2009 12:07:37 +0100
From: Catalin Marinas <catalin.marinas@....com>
To: linux-kernel@...r.kernel.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Cheng Renquan <crquan@...il.com>
Subject: [PATCH] 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 (and
prevent kmemleak from reporting it).
Signed-off-by: Catalin Marinas <catalin.marinas@....com>
Acked-by: Cheng Renquan <crquan@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
---
This patch was submitted and acked some time ago but I don't think it
made it into the kernel. Here it is again. Thanks.
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 8c3c689..e7a332f 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -492,6 +492,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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists