From: Andreas Dilger <adilger@clusterfs.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/2] Really ignore kmem_cache_destroy return value
Date: Mon, 28 Aug 2006 15:03:12 -0600 [thread overview]
Message-ID: <20060828210312.GE20105@schatzie.adilger.int> (raw)
In-Reply-To: <20060825212026.GA2246@martell.zuzino.mipt.ru>
On Aug 26, 2006 01:20 +0400, Alexey Dobriyan wrote:
> * Rougly half of callers already do it by not checking return value
> * Those who check it printk something, however, slab_error already printed
> the name of failed cache.
> * XFS BUGs on failed kmem_cache_destroy which is not the decision
> low-level filesystem driver should make. Converted to ignore.
If you are changing this, then it is better to add the BUG() at destroy time
right now. This makes it MUCH easier to track down the cause (i.e. when
there are slab items that failed to be released, instead of getting a BUG()
the next time someone tries to load that module and the slab already exists).
Just because a lot of code doesn't check the return value, doesn't mean
it shouldn't be possible to do so. Consider if there is lots of code
that doesn't check the kmalloc() return value - just because it works
most of the time doesn't mean we should start removing the checks for
a failed kmalloc().
Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.
prev parent reply other threads:[~2006-08-28 21:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-25 21:20 Alexey Dobriyan
2006-08-28 21:03 ` Andreas Dilger [this message]
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=20060828210312.GE20105@schatzie.adilger.int \
--to=adilger@clusterfs.com \
--cc=adobriyan@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-fsdevel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®