From: Matthew Wilcox 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 Signed-off-by: Andrew Morton --- kernel/resource.c | 2 ++ 1 file changed, 2 insertions(+) diff -puN kernel/resource.c~releasing-resources-with-children kernel/resource.c --- devel/kernel/resource.c~releasing-resources-with-children 2006-06-09 15:18:46.000000000 -0700 +++ devel-akpm/kernel/resource.c 2006-06-09 15:18:46.000000000 -0700 @@ -198,6 +198,8 @@ static int __release_resource(struct res } } + WARN_ON(old->child); + p = &old->parent->child; for (;;) { tmp = *p; _