lkml.org 
[lkml]   [2005]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Releasing resources with children
On Mon, Mar 14, 2005 at 10:49:16AM -0700, Matthew Wilcox wrote:
> What does it mean to release a resource with children? Should the
> children become children of the released resource's parent? Should they
> be released too? Should we fail the release?

I've been running kernels with:

+ if (old->child) {
+ printk("Resource %p still has children: %s\n", old, old->name);
+ return -EINVAL;
+ }
+

here and it hasn't triggered once. I suspect the reason it hasn't is
because no one does release a resource with children, but I suspect
that's just by mere luck than design.

The only thing I'd question is whether we really need to BUG_ON() here.
ISTR Linus' policy for BUG()/BUG_ON() was only if the condition lead
directly to a filesystem-corrupting bug.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
-
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: 2005-03-22 14:11    [W:0.032 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site