On Wed, 3 Sep 2003, Oliver Neukum wrote:

> > Aehm - are you really sure? I was always assuming what you say is true as 
> > far as it refers to "not every close(2) invokes fops->release", f.e. if a 
> > process has cloned fd's. However, if there are several process reading 
> > from the same file (chardev), I do still pretend we see nested 
> > fops->release calls!
> > 
> > If you don't agree, would you mind to explain the dmesg-log below? ;-)
> 
> Good question. I was very sure. How can filecounters be increased?

Not 100% sure about the VFS side. IIRC it was something like this:

Everytime we enter sys_open a new struct file is created with f_count=1 
initially. Other stuff like sys_dup apparently calls fget(f) which 
increases f_count. Calling sys_close invokes fput(f) which decreases 
f_count and calls fops->release when zero.

Martin



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to