lkml.org 
[lkml]   [2005]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] Releasing resources with children
Date
From
Releasing resources with children

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 bet we have no callers who expect this right now, but with
insert_resource() we may get some. At the point where someone hits this
BUG we can figure out what semantics we want.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>

diff -urpNX dontdiff linux-2.6.11-bk10/kernel/resource.c parisc-2.6-bk/kernel/resource.c
--- linux-2.6.11-bk10/kernel/resource.c 2005-03-14 06:44:08.205342005 -0700
+++ parisc-2.6-bk/kernel/resource.c 2005-03-14 07:07:54.000000000 -0700
@@ -181,6 +181,8 @@ static int __release_resource(struct res
{
struct resource *tmp, **p;

+ BUG_ON(old->child);
+
p = &old->parent->child;
for (;;) {
tmp = *p;
-
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    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site