From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Patrick Mochel <mochel@digitalimplant.org>
Cc: linux-kernel@vger.kernel.org, greg@kroah.com
Subject: Re: [6/9] [RFC] Steps to fixing the driver model locking
Date: Wed, 23 Mar 2005 22:06:45 +0900 [thread overview]
Message-ID: <8764zicxzu.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <Pine.LNX.4.50.0503211245530.20647-100000@monsoon.he.net> (Patrick Mochel's message of "Mon, 21 Mar 2005 12:48:47 -0800 (PST)")
Patrick Mochel <mochel@digitalimplant.org> writes:
> +void klist_del(struct klist_node * n)
> +{
> + struct klist * k = n->n_klist;
> +
> + spin_lock(&k->k_lock);
> + klist_dec_and_del(n);
> + spin_unlock(&k->k_lock);
> +}
Can't we use atomic_dec_and_lock()?
[...]
> +void klist_remove(struct klist_node * n)
> +{
> + spin_lock(&n->n_klist->k_lock);
> + klist_dec_and_del(n);
> + spin_unlock(&n->n_klist->k_lock);
> + wait_for_completion(&n->n_removed);
> +}
Why isn't those going into drivers/base/? Personally, klist seems
drivers/base stuff rather than generic stuff...
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2005-03-23 13:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-21 20:48 Patrick Mochel
2005-03-22 10:09 ` Christoph Hellwig
2005-03-22 17:48 ` Patrick Mochel
2005-03-23 13:06 ` OGAWA Hirofumi [this message]
2005-03-23 17:43 ` Patrick Mochel
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=8764zicxzu.fsf@devron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@digitalimplant.org \
/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®