From mboxrd@z Thu Jan 1 00:00:00 1970 From: corbet@lwn.net (Jonathan Corbet) Subject: Re: [PATCH 3/18] allow callers of seq_open do allocation themselves Date: Tue, 08 Nov 2005 13:33:37 -0700 Message-ID: <20051108203337.15569.qmail@lwn.net> References: Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Return-path: To: Al Viro In-reply-to: Your message of "Tue, 08 Nov 2005 02:01:31 GMT." Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Al Viro 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