[question] magic nfs path in fs/inode.c:iput()

Tigran Aivazian (tigran@veritas.com)
Thu, 29 Jun 2000 15:14:20 +0100 (BST)


Hi guys,

When we iput() an inode with i_count=0 and i_nlink>0 how can it possible
be not on a hashtable? The answers could be:

a) anonymous inode (i_sb == NULL) e.g. a socket but is there any place
that does iput(inode) on any such?

b) something to do with NFS as comment suggests but what exactly. I do not
understand. Looking at nfs_lookup() and __nfs_fhget() I discover a call to
iget4 which means the inode is nicely hashed by the (sb,ino) pair.

Therefore, the question remains - couldn't we rewrite that code to be more
compact

if (last i_count reference) {
if(last i_nlink reference) {
......
} else {
if (not dirty) {
remove from its current type list (which must be in_use)
add to the inode_unused list and leave on the hashtable so that
it can be reused later
}
}
..
}

Regards
Tigran

-
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/