Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 8 Mar 2001 11:49:23 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 8 Mar 2001 11:49:13 -0500 Received: from 513.holly-springs.nc.us ([216.27.31.173]:3332 "EHLO 513.holly-springs.nc.us") by vger.kernel.org with ESMTP id ; Thu, 8 Mar 2001 11:49:10 -0500 Message-Id: <200103081739.f28Hd0Q04143@513.holly-springs.nc.us> Subject: Re: opening files in /proc, and modules From: Michael Rothwell To: Alexander Viro Cc: linux-kernel@vger.kernel.org In-Reply-To: Content-Type: text/plain X-Mailer: Evolution (0.9/+cvs.2001.03.06.23.22 - Preview Release) Date: 08 Mar 2001 11:48:42 -0500 Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Sweet! Thanks! I'm working on 2.2 for now, but the 2.4 API looks nicer... :) -M On 08 Mar 2001 11:43:24 -0500, Alexander Viro wrote: > > > On 8 Mar 2001, Michael Rothwell wrote: > > > Figured it out -- I think. This appears to be the answer: > > > > In struct proc_dir_entry,set the fill_inode function pointer to a > > callback to handle refcounts. > > > > struct proc_dir_entry > > { > > ... > > void (*fill_inode)(struct inode *, int); > > ... > > }; > [snip] > > ... right? :) > > Right for 2.2, wrong for 2.4. There you just set ->owner to THIS_MODULE > and forget about the whole mess with callbacks. > Cheers, > Al - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/