Commit 298c1edd 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 58eaab75
...@@ -173,6 +173,14 @@ static int __release_resource(struct resource *old) ...@@ -173,6 +173,14 @@ static int __release_resource(struct resource *old)
{ {
struct resource *tmp, **p; struct resource *tmp, **p;
if (old->child) {
static int warned;
if (warned < 5) {
warned++;
WARN_ON(1);
}
}
p = &old->parent->child; p = &old->parent->child;
for (;;) { for (;;) {
tmp = *p; 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