diff options
author | Matthew Wilcox <willy@parisc-linux.org> | 2015-05-14 01:02:17 +0000 |
---|---|---|
committer | Johannes Weiner <hannes@cmpxchg.org> | 2015-05-14 01:02:17 +0000 |
commit | a80d9c16108f1d092cc80716968390ddc44fe640 (patch) | |
tree | 4636b9ea4fde4a7143e196ffe7950bc847dea37e | |
parent | 53d174fda1ba309d07c41183e76380a00ec05206 (diff) | |
download | mm-next-a80d9c16108f1d092cc80716968390ddc44fe640.tar.gz |
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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | kernel/resource.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/resource.c b/kernel/resource.c index 02cfa1cc84483c..86523b7d7b8f7b 100644 --- a/kernel/resource.c +++ b/kernel/resource.c @@ -245,6 +245,8 @@ static int __release_resource(struct resource *old) } } + WARN_ON(old->child); + p = &old->parent->child; for (;;) { tmp = *p; |