public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Cheng Renquan <crquan@gmail.com>
Subject: Re: [PATCH] Free the temporary vfsmount created in bdev_cache_init()
Date: Wed, 1 Apr 2009 12:49:55 +0100	[thread overview]
Message-ID: <20090401114955.GC28946@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20090401110703.12974.99902.stgit@pc1117.cambridge.arm.com>

On Wed, Apr 01, 2009 at 12:07:37PM +0100, Catalin Marinas wrote:
> 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).

NAK.  This kind of kludges is simply not worth doing.  Store the
pointer to vfsmount into a static-in-file variable if you want
to get kmemleak to STFU.

Savings on a vfsmount are not worth neurons needed to remember that
in this particular case we are OK to do something that is utterly
wrong in general (free_vfsmnt() is a very low-level stuff that shouldn't
be used outside of namespace.c and super.c).

  reply	other threads:[~2009-04-01 11:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-01 11:07 [PATCH] Free the temporary vfsmount created in bdev_cache_init() Catalin Marinas
2009-04-01 11:49 ` Al Viro [this message]
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=20090401114955.GC28946@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --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