Return-path: Received: from mail-pb0-f46.google.com ([209.85.160.46]:61143 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756079Ab3DQBBP (ORCPT ); Tue, 16 Apr 2013 21:01:15 -0400 Received: by mail-pb0-f46.google.com with SMTP id rp8so585526pbb.19 for ; Tue, 16 Apr 2013 18:01:15 -0700 (PDT) Date: Tue, 16 Apr 2013 18:01:04 -0700 From: Greg KH To: David Howells Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, Mauro Carvalho Chehab , linux-scsi@vger.kernel.org, Jerry Chuang , linux-wireless@vger.kernel.org, YAMANE Toshiaki , Maxim Mikityanskiy , viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 14/28] proc: Supply an accessor for getting the data from a PDE's parent [RFC] Message-ID: <20130417010104.GF11541@kroah.com> (sfid-20130417_030130_970649_F0AB27CF) References: <20130416182550.27773.89310.stgit@warthog.procyon.org.uk> <20130416182646.27773.40149.stgit@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20130416182646.27773.40149.stgit@warthog.procyon.org.uk> Sender: linux-wireless-owner@vger.kernel.org List-ID: On Tue, Apr 16, 2013 at 07:26:46PM +0100, David Howells wrote: > Supply an accessor function for getting the private data from the parent > proc_dir_entry struct of the proc_dir_entry struct associated with an inode. > > ReiserFS, for instance, stores the super_block pointer in the proc directory > it makes for that super_block, and a pointer to the respective seq_file show > function in each of the proc files in that directory. > > This allows a reduction in the number of file_operations structs, open > functions and seq_operations structs required. The problem otherwise is that > each show function requires two pieces of data but only has storage for one > per PDE (and this has no release function). > > Signed-off-by: David Howells > cc: Jerry Chuang > cc: Mauro Carvalho Chehab > cc: Maxim Mikityanskiy > cc: YAMANE Toshiaki > cc: linux-wireless@vger.kernel.org > cc: linux-scsi@vger.kernel.org > cc: devel@driverdev.osuosl.org Acked-by: Greg Kroah-Hartman