From: Kay Sievers <kay.sievers@vrfy.org>
To: Jonathan Corbet <corbet@lwn.net>
Cc: linux-kernel <linux-kernel@vger.kernel.org>, Greg KH <greg@kroah.com>
Subject: Re: [PATCH] support polling of /proc/swaps
Date: Tue, 19 Oct 2010 20:54:44 +0200 [thread overview]
Message-ID: <AANLkTik3PG966VAA3ZM7L0SyPpuvqVuTXH6h7WZvwngF@mail.gmail.com> (raw)
In-Reply-To: <20101019101158.29e8cd0f@bike.lwn.net>
On Tue, Oct 19, 2010 at 18:11, Jonathan Corbet <corbet@lwn.net> wrote:
> Here we have this:
>
>> +static unsigned swaps_poll(struct file *file, poll_table *wait)
>> +{
>> + struct proc_swaps *s = file->private_data;
>
> But here I see:
>
>> static int swaps_open(struct inode *inode, struct file *file)
>> {
>> - return seq_open(file, &swaps_op);
>> + struct proc_swaps *s;
>> + int ret;
>> +
>> + s = kmalloc(sizeof(struct proc_swaps), GFP_KERNEL);
>> + if (!s)
>> + return -ENOMEM;
>> +
>> + file->private_data = &s->seq;
>
> It sure looks to me like private_data is a struct seq_file pointer, not a
> struct proc_swaps pointer. What am I missing?
Right, that looks weird. It's the same pointer though, because it's
the first element. I'll correct that.
Thanks a lot for the sharp eyes,
Kay
next prev parent reply other threads:[~2010-10-19 18:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-19 9:19 [PATCH] support polling of /proc/swaps Kay Sievers
2010-10-19 11:09 ` Peter Zijlstra
2010-10-19 16:11 ` Jonathan Corbet
2010-10-19 18:54 ` Kay Sievers [this message]
2010-10-19 22:31 ` Andrew Morton
2010-10-19 23:25 ` Kay Sievers
2010-10-19 23:38 ` Andrew Morton
2010-11-15 3:44 ` Neil Brown
2010-11-16 15:56 ` Kay Sievers
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=AANLkTik3PG966VAA3ZM7L0SyPpuvqVuTXH6h7WZvwngF@mail.gmail.com \
--to=kay.sievers@vrfy.org \
--cc=corbet@lwn.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).