kernels/linux-2.4.0/fs/nfs/inode.c
/*
 * Look up the inode by super block and fattr->fileid.
 */
Look up the inode by super block and fattr->fileid.
Look up the inode by super block and fattr - > fileid .
static struct inode *
__nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr)
{
	struct nfs_find_desc desc = { fh, fattr };
	struct inode *inode = NULL;
	unsigned long ino;
	if ((fattr->valid & NFS_ATTR_FATTR) == 0)
		goto out_no_inode;
	if (!fattr->nlink) {
		printk("NFS: Buggy server - nlink == 0!\n");
		goto out_no_inode;
	}
	ino = nfs_fattr_to_ino_t(fattr);
	if (!(inode = iget4(sb, ino, nfs_find_actor, &desc)))
		goto out_no_inode;
	nfs_fill_inode(inode, fh, fattr);
	dprintk("NFS: __nfs_fhget(%x/%Ld ct=%d)\n",
		inode->i_dev, (long long)NFS_FILEID(inode),
		atomic_read(&inode->i_count));
out:
	return inode;
out_no_inode:
	printk("__nfs_fhget: iget failed\n");
	goto out;
}
static struct inode * __nfs_fhget ( struct super_block * sb , struct nfs_fh * fh , struct nfs_fattr * fattr ) { struct nfs_find_desc desc = { fh , fattr } ; struct inode * inode = NULL ; unsigned long ino ; if ( ( fattr -> valid & NFS_ATTR_FATTR ) == 0 ) goto out_no_inode ; if ( ! fattr -> nlink ) { printk ( " \n " ) ; goto out_no_inode ; } ino = nfs_fattr_to_ino_t ( fattr ) ; if ( ! ( inode = iget4 ( sb , ino , nfs_find_actor , & desc ) ) ) goto out_no_inode ; nfs_fill_inode ( inode , fh , fattr ) ; dprintk ( " \n " , inode -> i_dev , ( long long ) NFS_FILEID ( inode ) , atomic_read ( & inode -> i_count ) ) ; out : return inode ; out_no_inode : printk ( " \n " ) ; goto out ; }
Look up the inode by super block and fattr->fileid.
Look up the inode by super block and fattr - > fileid .