File reference count anomaly research and fixup

2015-05-06 Thread Vitaliy Makkoveev
Struct file has reference count f_count field. When f_count 0 file instance exists, when f_count becomes 0 file instance should be removed. It's simple but some strange magic exists. When file was created by falloc() it has f_count == 2. One additional FREF() call was done inside falloc(). After

Re: File reference count anomaly research and fixup

2015-05-06 Thread Philip Guenther
On Wed, May 6, 2015 at 2:23 AM, Vitaliy Makkoveev kanonenvogel@gmail.com wrote: Struct file has reference count f_count field. When f_count 0 file instance exists, when f_count becomes 0 file instance should be removed. It's simple but some strange magic exists. When file was created by