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

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


ok, it is clear now - thank you Alexander for your answer.

and yes, I see sock_release() doing iput(sock->inode) - if I did grep
net/* for iput() I wouldn't need to ask this question :)

Regards,
Tigran

On Thu, 29 Jun 2000, Alexander Viro wrote:

>
>
> On Thu, 29 Jun 2000, Tigran Aivazian wrote:
>
> > 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:
>
> Trivially: filesystem didn't care to put it there. Procfs proper, for one.
>
> > a) anonymous inode (i_sb == NULL) e.g. a socket but is there any place
> > that does iput(inode) on any such?
>
> Sure, how else would they be destroyed?
>
> > 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.
>
> IIRC, at some point Andrea had misread the stuff, thus the comment.
>
> > Therefore, the question remains - couldn't we rewrite that code to be more
> > compact
>
> Please, leave it as is. Inodes _can_ be legitimately not in the hash.
>
>

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