/* "child" must always be a directory. */ if (!S_ISDIR(child_inode->i_mode)) {
printk(KERN_ERR "isofs: isofs_export_get_parent(): " "child is not a directory!\n");
rv = ERR_PTR(-EACCES); goto out;
}
/* It is an invariant that the directory offset is zero. If *itisnotzero,itmeansthedirectoryfailedtobe
* normalized for some reason. */ if (e_child_inode->i_iget5_offset != 0) {
printk(KERN_ERR "isofs: isofs_export_get_parent(): " "child directory not normalized!\n");
rv = ERR_PTR(-EACCES); goto out;
}
/* The child inode has been normalized such that its *i_iget5_blockvaluepointstothe"."entry.Fortunately,
* the ".." entry is located in the same block. */
parent_block = e_child_inode->i_iget5_block;
/* Get the block in question. */
bh = sb_bread(child_inode->i_sb, parent_block); if (bh == NULL) {
rv = ERR_PTR(-EACCES); goto out;
}
/* This is the "." entry. */
de = (struct iso_directory_record*)bh->b_data;
/* The ".." entry is always the second entry. */
parent_offset = (unsignedlong)isonum_711(de->length);
de = (struct iso_directory_record*)(bh->b_data + parent_offset);
/* Verify it is in fact the ".." entry. */ if ((isonum_711(de->name_len) != 1) || (de->name[0] != 1)) {
printk(KERN_ERR "isofs: Unable to find the \"..\" " "directory for NFS.\n");
rv = ERR_PTR(-EACCES); goto out;
}
staticint
isofs_export_encode_fh(struct inode *inode,
__u32 *fh32, int *max_len, struct inode *parent)
{ struct iso_inode_info * ei = ISOFS_I(inode); int len = *max_len; int type = 1;
__u16 *fh16 = (__u16*)fh32;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.