From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyrill Gorcunov Subject: Re: [patch 3/8] procfs: Add ability to plug in auxiliary fdinfo providers Date: Thu, 16 Aug 2012 01:34:49 +0400 Message-ID: <20120815213449.GQ23657@moon> References: <20120815092116.700948346@openvz.org> <20120815092409.507162379@openvz.org> <20120815212927.GO23464@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Alexey Dobriyan , Andrew Morton , Pavel Emelyanov , James Bottomley , Matthew Helsley To: Al Viro Return-path: Content-Disposition: inline In-Reply-To: <20120815212927.GO23464@ZenIV.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, Aug 15, 2012 at 10:29:27PM +0100, Al Viro wrote: > > This, BTW, is too convoluted for its own good. What you need is > something like > struct whatever { > struct seq_file *m; > struct file *f; > int flags; > }; > with single allocation of that sucker in your ->open(). Set > file->private_data to address of seq_file field in your object *before* > calling seq_open() and don't bother with m->private at all - just use > container_of(m, struct whatever, m) in your ->show() to get to that > structure... I will try and post results, thanks! Cyrill