Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 8 Mar 2001 11:44:33 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 8 Mar 2001 11:44:14 -0500 Received: from leibniz.math.psu.edu ([146.186.130.2]:56784 "EHLO math.psu.edu") by vger.kernel.org with ESMTP id ; Thu, 8 Mar 2001 11:43:57 -0500 Date: Thu, 8 Mar 2001 11:43:24 -0500 (EST) From: Alexander Viro To: Michael Rothwell cc: linux-kernel@vger.kernel.org Subject: Re: opening files in /proc, and modules In-Reply-To: <200103081726.f28HQ0Q04099@513.holly-springs.nc.us> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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/