MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / Ext2LoadInode

Function Ext2LoadInode

Ext4Fsd/ext3/generic.c:504–534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502
503
504BOOLEAN
505Ext2LoadInode (IN PEXT2_VCB Vcb,
506 IN struct inode *Inode)
507{
508 struct ext4_inode* ext4i;
509 struct ext4_inode_info unused = {0};
510 LONGLONG offset;
511
512 if (!Ext2GetInodeLba(Vcb, Inode->i_ino, &offset)) {
513 DEBUG(DL_ERR, ("Ext2LoadInode: failed inode %u.\n", Inode->i_ino));
514 return FALSE;
515 }
516
517 ext4i = (struct ext4_inode*) Ext2AllocatePool(NonPagedPool, EXT4_INODE_SIZE(Inode->i_sb), EXT2_INODE_MAGIC);
518 if (!ext4i) {
519 return FALSE;
520 }
521
522 if (!Ext2LoadBuffer(NULL, Vcb, offset, EXT4_INODE_SIZE(Inode->i_sb), ext4i)) {
523 ExFreePool(ext4i);
524 return FALSE;
525 }
526
527 Ext2DecodeInode(Inode, ext4i);
528
529 ext4_inode_csum_verify(Inode, ext4i, &unused);
530
531 ExFreePool(ext4i);
532
533 return TRUE;
534}
535
536
537BOOLEAN

Callers 5

Ext2ProcessEntryFunction · 0.85
Ext2InitializeVcbFunction · 0.85
Ext2LookupFileFunction · 0.85
Ext2RefreshSuperFunction · 0.85
Ext2LoadInternalJournalFunction · 0.85

Calls 5

Ext2GetInodeLbaFunction · 0.85
Ext2AllocatePoolFunction · 0.85
Ext2LoadBufferFunction · 0.85
Ext2DecodeInodeFunction · 0.85
ext4_inode_csum_verifyFunction · 0.85

Tested by

no test coverage detected