From: ebiederm@xmission.com (Eric W. Biederman)
To: Takenori Nagano <t-nagano@ah.jp.nec.com>
Cc: linux-kernel@vger.kernel.org, vgoyal@in.ibm.com,
k-miyoshi@cb.jp.nec.com, kexec@lists.infradead.org,
Bernhard Walle <bwalle@suse.de>, Keith Owens <kaos@ocs.com.au>,
Andrew Morton <akpm@linux-foundation.org>,
kdb@oss.sgi.com
Subject: Re: [PATCH 1/2] add tunable_notifier function
Date: Fri, 05 Oct 2007 06:49:40 -0600 [thread overview]
Message-ID: <m1ir5llo9n.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <4704D0BA.4090507@ah.jp.nec.com> (Takenori Nagano's message of "Thu, 04 Oct 2007 20:38:34 +0900")
Takenori Nagano <t-nagano@ah.jp.nec.com> writes:
> This patch adds new notifier function tunable_notifier_chain. Its base is
> atomic_notifier_chain.
> +/**
> + * tunable_notifier_chain_register - Add notifier to an tunable notifier chain
> + * @nh: Pointer to head of the tunable notifier chain
> + * @n: New entry in notifier chain
> + * @name: Pointer to the name of this notifier chain
> + * @desc: Pointer to the description of new entry
> + *
> + * Adds a notifier to an tunable notifier chain and makes control dir.
> + *
> + * Returns zero on success or %-ENODEV on failure.
> + */
> +
> +int tunable_notifier_chain_register(struct tunable_notifier_head *nh,
> + struct tunable_notifier_block *n, char *name, char *desc)
> +{
> + unsigned long flags;
> + int ret = -EINVAL;
> + struct dentry *nh_dir, *nb_dir, *pri_dentry, *desc_dentry = NULL;
> +
> + if (!name)
> + goto nb_fail;
> +
> + ret = -ENOMEM;
> + if (!nh->dir) {
> + nh_dir = debugfs_create_dir(nh->name, NULL);
Hmm. debugfs does not appear to be an appropriate place to create
files that are supposed to be part of a serious user space interface.
Eric
prev parent reply other threads:[~2007-10-05 12:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-04 11:38 [PATCH 1/2] add tunable_notifier function Takenori Nagano
2007-10-04 16:11 ` Randy Dunlap
2007-10-05 5:06 ` Takenori Nagano
2007-10-05 5:42 ` Vivek Goyal
2007-10-05 5:49 ` Takenori Nagano
2007-10-05 12:49 ` Eric W. Biederman [this message]
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=m1ir5llo9n.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=akpm@linux-foundation.org \
--cc=bwalle@suse.de \
--cc=k-miyoshi@cb.jp.nec.com \
--cc=kaos@ocs.com.au \
--cc=kdb@oss.sgi.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=t-nagano@ah.jp.nec.com \
--cc=vgoyal@in.ibm.com \
/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