From: Maneesh Soni <maneesh@in.ibm.com>
To: Tom Zanussi <zanussi@us.ibm.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Greg KH <greg@kroah.com>, Andrew Morton <akpm@osdl.org>,
Andi Kleen <ak@muc.de>, Roman Zippel <zippel@linux-m68k.org>,
Robert Wisniewski <bob@watson.ibm.com>,
Tim Bird <tim.bird@AM.SONY.COM>,
Christoph Hellwig <hch@infradead.org>,
karim@opersys.com
Subject: Re: [PATCH] relayfs redux, part 4
Date: Thu, 10 Feb 2005 12:00:54 +0530 [thread overview]
Message-ID: <20050210063054.GA4216@in.ibm.com> (raw)
In-Reply-To: <16906.52160.870346.806462@tut.ibm.com>
On Wed, Feb 09, 2005 at 08:49:36PM -0600, Tom Zanussi wrote:
[..]
> + */
> +struct dentry *relayfs_create_file(const char *name, struct dentry *parent,
> + int mode, struct rchan *chan)
> +{
> + struct dentry *dentry;
> + int error;
> +
> + if (!mode)
> + mode = S_IRUSR;
> + mode = (mode & S_IALLUGO) | S_IFREG;
> +
> + error = relayfs_create_entry(name, parent, mode, chan, &dentry);
^^^^
I think you missed GregKH's suggesstion to have relayfs_create_entry()
return pointer to struct dentry, and reduce one parameter.
> +unsigned relay_switch_subbuf(struct rchan_buf *buf, unsigned length)
> +{
> + int cur_subbuf, prev_subbuf, subbufs_produced;
> + unsigned start = 0, padding = buf->chan->subbuf_size - buf->offset;
> +
> + if (unlikely(relay_buf_full(buf)))
> + return 0;
> +
> + subbufs_produced = atomic_read(&buf->subbufs_produced);
> + cur_subbuf = prev_subbuf = subbufs_produced % buf->chan->n_subbufs;
> + buf->padding[cur_subbuf] = padding;
> +
> + atomic_inc(&buf->subbufs_produced);
> +
> + if (waitqueue_active(&buf->read_wait)) {
> + PREPARE_WORK(&buf->wake_readers, wakeup_readers, buf);
> + schedule_delayed_work(&buf->wake_readers, 1);
> + }
> +
> + if (unlikely(relay_buf_full(buf))) {
> + return 0;
> + buf->chan->cb->buf_full(buf);
^^^^^^^^
Typo? statement after return !
Thanks
Maneesh
--
Maneesh Soni
Linux Technology Center,
IBM India Software Labs,
Bangalore, India
email: maneesh@in.ibm.com
Phone: 91-80-25044990
next prev parent reply other threads:[~2005-02-10 6:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-10 2:49 [PATCH] relayfs redux, part 4 Tom Zanussi
2005-02-10 6:30 ` Maneesh Soni [this message]
2005-02-10 6:49 ` Tom Zanussi
2005-02-10 7:33 ` Pekka Enberg
2005-02-10 9:09 ` Andi Kleen
2005-02-10 9:14 ` Pekka J Enberg
2005-02-10 7:52 ` [PATCH] " Pekka Enberg
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=20050210063054.GA4216@in.ibm.com \
--to=maneesh@in.ibm.com \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--cc=bob@watson.ibm.com \
--cc=greg@kroah.com \
--cc=hch@infradead.org \
--cc=karim@opersys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tim.bird@AM.SONY.COM \
--cc=zanussi@us.ibm.com \
--cc=zippel@linux-m68k.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 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.