Commit b6eb0c22 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by james toy

Currently, releasing a resource also releases all of its children. That

made sense when request_resource was the main method of dividing up the
memory map.  With the increased use of insert_resource, it seems to me that
we should instead reparent the newly orphaned resources.  Before we do
that, let's make sure that nobody's actually relying on the current
semantics.
Signed-off-by: default avatarMatthew Wilcox <matthew@wil.cx>
Cc: Greg KH <greg@kroah.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 2cf350bb
......@@ -173,6 +173,14 @@ static int __release_resource(struct resource *old)
{
struct resource *tmp, **p;
if (old->child) {
static int warned;
if (warned < 5) {
warned++;
WARN_ON(1);
}
}
p = &old->parent->child;
for (;;) {
tmp = *p;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment