From: willy@parisc-linux.org (Matthew Wilcox)
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, matthew@wil.cx
Subject: [PATCH] Releasing resources with children
Date: Mon, 14 Mar 2005 10:49:16 -0700 (MST) [thread overview]
Message-ID: <20050314174916.B49754957B9@palinux.hppa> (raw)
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;
next reply other threads:[~2005-03-14 17:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-14 17:49 Matthew Wilcox [this message]
2005-03-14 18:11 ` Russell King
2005-03-14 21:49 ` Ingo Oeser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050314174916.B49754957B9@palinux.hppa \
--to=willy@parisc-linux.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®