All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maneesh Soni <maneesh@in.ibm.com>
To: Paul Mundt <lethal@linux-sh.org>, Greg KH <greg@kroah.com>,
	Christoph Hellwig <hch@infradead.org>,
	zanussi@us.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] sysfs: relay channel buffers as sysfs attributes
Date: Thu, 23 Feb 2006 16:29:35 +0530	[thread overview]
Message-ID: <20060223105934.GA6884@in.ibm.com> (raw)
In-Reply-To: <20060219210757.GB3682@linux-sh.org>

On Sun, Feb 19, 2006 at 11:07:57PM +0200, Paul Mundt wrote:


> +
> +static struct dentry *
> +sysfs_create_buf_file(const char *filename, struct dentry *dentry, int mode,
> +		      struct rchan_buf *buf, int *is_global)
> +{
> +	struct relay_attribute *attr = (struct relay_attribute *)dentry;
> +	struct dentry *parent = attr->kobj->dentry;
> +	int ret;
> +
> +	attr->attr.mode = mode;
> +	attr->rchan_buf = buf;
> +
> +	ret = sysfs_add_file(parent, &attr->attr, SYSFS_KOBJ_RELAY_ATTR);
> +	if (unlikely(ret != 0))
> +		return NULL;
> +
> +	dentry = lookup_one_len(filename, parent, strlen(filename));

lookup_one_len() needs parent's i_mutex.


> +	if (IS_ERR(dentry))
> +		sysfs_hash_and_remove(parent, filename);

Also wondering if you have considered the case of -EEXIST?

> +
> +	return dentry;
> +}


Thanks
Maneesh


-- 
Maneesh Soni
Linux Technology Center, 
IBM India Software Labs,
Bangalore, India
email: maneesh@in.ibm.com
Phone: 91-80-25044990

  reply	other threads:[~2006-02-23 11:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-19 21:07 [PATCH 0/5] relay: Migrate from relayfs to a generic relay API Paul Mundt
2006-02-19 21:07 ` [PATCH 1/5] sysfs: relay channel buffers as sysfs attributes Paul Mundt
2006-02-23 10:59   ` Maneesh Soni [this message]
2006-02-24  8:34     ` Paul Mundt
2006-02-24  9:35       ` Maneesh Soni
2006-02-19 21:08 ` [PATCH 2/5] relay: Consolidate relayfs core into kernel/relay.c Paul Mundt
2006-02-19 21:08 ` [PATCH 3/5] sysfs: Update relay file support for generic relay API Paul Mundt
2006-02-19 21:08 ` [PATCH 4/5] relayfs: Remove relayfs in favour of CONFIG_RELAY Paul Mundt
2006-02-19 21:09 ` [PATCH 5/5] relay: relay header cleanup Paul Mundt
2006-02-19 21:21 ` [PATCH 0/5] relay: Migrate from relayfs to a generic relay API Dave Jones
2006-02-19 21:27   ` Paul Mundt
2006-02-19 21:54     ` [PATCH] relayfs: Convert to " Paul Mundt
2006-02-19 22:09       ` Christoph Hellwig
2006-02-19 22:08   ` [PATCH 0/5] relay: Migrate from relayfs to a " Christoph Hellwig
2006-02-19 22:13     ` Dave Jones
2006-02-19 22:17       ` Christoph Hellwig
2006-02-19 22:29         ` Dave Jones
2006-02-19 22:48           ` Christoph Hellwig
2006-02-19 22:54             ` Dave Jones
2006-02-20 16:03               ` Christoph Hellwig
2006-02-20 20:05                 ` Frank Ch. Eigler

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=20060223105934.GA6884@in.ibm.com \
    --to=maneesh@in.ibm.com \
    --cc=greg@kroah.com \
    --cc=hch@infradead.org \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zanussi@us.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.