From: corbet@lwn.net (Jonathan Corbet)
To: Al Viro <viro@ftp.linux.org.uk>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 3/18] allow callers of seq_open do allocation themselves
Date: Tue, 08 Nov 2005 13:33:37 -0700 [thread overview]
Message-ID: <20051108203337.15569.qmail@lwn.net> (raw)
In-Reply-To: Your message of "Tue, 08 Nov 2005 02:01:31 GMT." <E1EZInj-0001Eh-9T@ZenIV.linux.org.uk>
Al Viro <viro@ftp.linux.org.uk> wrote:
> Allows caller of seq_open() to kmalloc() seq_file + whatever else they want
> and set ->private_data to it. seq_open() will then abstain from doing
> allocation itself.
It looks like seq_release() frees the structure regardless of where it
came from. So the seq_file structure must be the first field in
whatever structure contains it, and one has to hope that won't change in
the future. Is that really the way the interface was meant to work?
jon
prev parent reply other threads:[~2005-11-08 20:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-08 2:01 [PATCH 3/18] allow callers of seq_open do allocation themselves Al Viro
2005-11-08 3:03 ` [OT] " Randy.Dunlap
2005-11-08 3:24 ` Neil Brown
2005-11-08 3:12 ` Randy.Dunlap
2005-11-08 3:30 ` Al Viro
2005-11-08 3:48 ` Linus Torvalds
2005-11-08 3:45 ` Linus Torvalds
2005-11-08 20:33 ` Jonathan Corbet [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=20051108203337.15569.qmail@lwn.net \
--to=corbet@lwn.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ftp.linux.org.uk \
/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).