lkml.org 
[lkml]   [1998]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: file system building
Magnus Ahltorp wrote:

> The problem is, when the inode is cached in the dcache, it must have been
> created by the iget(sb,xnode), and the reference count should be 0 (if
> noone uses it). But, if I let the reference count drop to 0, the inode
> will be deallocated. If I then do a dcache lookup, I will get an inode
> number that does not map to an inode anymore. I will try to do an
> iget(sb,xnode) on it, but since my read_inode does not do much, I get
> something completly useless.

Inodes being held by the dcache should have a use count of 1 -- the
normal state of an inode in use is that only the dentry has a reference
to it. The life of the dentry then determines the life of the inode;
when the dentry is released, the inode count goes to 0 and the inode is
usually freed almost immediately.

Regards,
Bill

\
 
 \ /
  Last update: 2005-03-22 13:41    [from the cache]
©2003-2011 Jasper Spaans