lkml.org 
[lkml]   [2007]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Add a refcount check in dput()
On Mon, 17 Sep 2007 11:21:35 -0700
"Paul Menage" <menage@google.com> wrote:

> On 9/15/07, Andrew Morton <akpm@linux-foundation.org> wrote:
> > >
> > > + BUG_ON(!atomic_read(&dentry->d_count));
> > > repeat:
> > > if (atomic_read(&dentry->d_count) == 1)
> > > might_sleep();
> >
> > eek, much too aggressive.
>
> How about the equivalent BUG_ON() in dget()? I figure that they ought
> to both be of the same strictness.

The one in dget() is known not to trigger - it's been there for a long time.

My problem with new BUG_ON's is that they get added thinking "no way will
this trigger" and lo, they do trigger and lots of people get their testing
disrupted for a whole release.



Long-standing checks like the one in dget() should perhaps be removed now
that we know they don't trigger - move them under some CONFIG_DEBUG_foo
option.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-09-17 22:51    [W:0.040 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site