From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [patch 3/8] procfs: Add ability to plug in auxiliary fdinfo providers Date: Tue, 14 Aug 2012 22:27:21 +0100 Message-ID: <20120814212721.GJ23464@ZenIV.linux.org.uk> References: <20120814140342.354405844@openvz.org> <20120814140620.033884909@openvz.org> <20120814183142.GH23464@ZenIV.linux.org.uk> <20120814183558.GA1551@moon> <20120814195649.GB31043@moon> 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: Cyrill Gorcunov Return-path: Content-Disposition: inline In-Reply-To: <20120814195649.GB31043@moon> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, Aug 14, 2012 at 11:56:49PM +0400, Cyrill Gorcunov wrote: > Al, does the patch below looks better? If so I'll fix up the rest. > struct file_operations { > struct module *owner; > + struct seq_operations *fdinfo_ops; IDGI. Why on the earth do you need the whole iterator? All it takes is show_fdinfo(struct seq_file *m, struct file *f); have ->show() in your iterator (one going through the files) call that sucker for the file we are trying to show. I think you are severely overdesigning that thing...