Re: use counts for /proc modules

Richard Henderson (rth@dot.cygnus.com)
Thu, 2 Oct 1997 11:10:29 -0700


On Thu, Oct 02, 1997 at 12:49:17PM -0400, Bill Hawes wrote:
> The only way I can think to do this is
> to add another function pointer to proc_dir_entry that would increment
> or decrement the module count.

Hmm. I guess what you really need is to be able to determine if the
thing is a module. Which might come in handy for other things as well.

Have a look at what the scsi subsystem does with its

if (rscsi_disks[target].device->host->hostt->module)
__MOD_INC_USE_COUNT(rscsi_disks[target].device->host->hostt->module);

It gets set via init_module in scsi_module.c, btw.

r~