From: Catalin Marinas <catalin.marinas@arm.com>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Cheng Renquan <crquan@gmail.com>
Subject: [PATCH] Free the temporary vfsmount created in bdev_cache_init()
Date: Wed, 01 Apr 2009 12:07:37 +0100 [thread overview]
Message-ID: <20090401110703.12974.99902.stgit@pc1117.cambridge.arm.com> (raw)
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@arm.com>
Acked-by: Cheng Renquan <crquan@gmail.com>
Cc: Andrew Morton <akpm@linux-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);
}
/*
next reply other threads:[~2009-04-01 11:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-01 11:07 Catalin Marinas [this message]
2009-04-01 11:49 ` [PATCH] Free the temporary vfsmount created in bdev_cache_init() Al Viro
2009-04-01 12:12 ` Catalin Marinas
-- strict thread matches above, loose matches on Subject: below --
2009-01-14 11:40 Catalin Marinas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090401110703.12974.99902.stgit@pc1117.cambridge.arm.com \
--to=catalin.marinas@arm.com \
--cc=akpm@linux-foundation.org \
--cc=crquan@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox