Re: release not called for my driver?

Stephen Williams (steve@icarus.com)
Mon, 03 Jan 2000 16:24:29 -0800


alan@lxorguk.ukuu.org.uk said:
> Guess one - you are still fiddling with the usage counts. With Linux
> 2.2.x you dont need to do that

You mean the module usage counts? I have code like this:

static void xxvmclose(struct vm_area_struct*vma)
{
[...]
MOD_DEC_USE_COUNT;
}

that counts module references when an application maps the driver.
The reference counts I see from lsmod are always exactly as I expect.
Are you saying that the kernel independently knows that a VMA references
a module? (I doubt you mean that.)

Or (as I suspect) do you mean the f_count in the file structure a la:

vma->vm_file = file;
file->f_count += 1;

Should I not be doing this in 2.2 kernels?

-- 
Steve Williams                "The woods are lovely, dark and deep.
steve@icarus.com              But I have promises to keep,
steve@picturel.com            and lines to code before I sleep,
http://www.picturel.com       And lines to code before I sleep."

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/