/* Note that when first composed, the dentry may not yet have an inode. In this case a call to fh_update should be made before the fh goes out on the wire ...  */
static void _fh_update(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry)
/* Note that when first composed, the dentry may not yet have an inode. In this case a call to fh_update should be made before the fh goes out on the wire ...  */
static void _fh_update(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry)
{
	if (dentry != exp->ex_path.dentry) {
		struct fid *fid = (struct fid *)
			(fhp->fh_handle.fh_auth + fhp->fh_handle.fh_size/4 - 1);
		int maxsize = (fhp->fh_maxsize - fhp->fh_handle.fh_size)/4;
		int subtreecheck = !(exp->ex_flags & NFSEXP_NOSUBTREECHECK);
		fhp->fh_handle.fh_fileid_type =
			exportfs_encode_fh(dentry, fid, &maxsize, subtreecheck);
		fhp->fh_handle.fh_size += maxsize * 4;
	} else {
		fhp->fh_handle.fh_fileid_type = FILEID_ROOT;
	}
}