Displaying 2 results from an estimated 2 matches for "ext2_iget_by_inr".
2013 Mar 02
0
[GIT-PULL] ext4 inline data support
...struct inode *inode, const struct ext2_inode *e_inode)
inode->flags = e_inode->i_flags;
inode->file_acl = e_inode->i_file_acl;
memcpy(PVT(inode)->i_block, e_inode->i_block, sizeof PVT(inode)->i_block);
+ PVT(inode)->i_ino = inr;
}
static struct inode *ext2_iget_by_inr(struct fs_info *fs, uint32_t inr)
@@ -169,11 +170,32 @@ static struct inode *ext2_iget_by_inr(struct fs_info *fs, uint32_t inr)
if (!(inode = alloc_inode(fs, inr, sizeof(struct ext2_pvt_inode))))
return NULL;
- fill_inode(inode, e_inode);
+ fill_inode(inode, e_inode, inr);
ret...
2012 Aug 02
2
[PATCH] add additional checks to ext2 loader
...fs_info *fs, int inr)
block_off = inode_offset % EXT2_INODES_PER_BLOCK(fs);
data = get_cache(fs->fs_dev, block_num);
+ if (!data)
+ return NULL;
return (const struct ext2_inode *)
(data + block_off * EXT2_SB(fs)->s_inode_size);
@@ -164,7 +166,7 @@ static struct inode *ext2_iget_by_inr(struct fs_info *fs, uint32_t inr)
struct inode *inode;
e_inode = ext2_get_inode(fs, inr);
- if (!(inode = alloc_inode(fs, inr, sizeof(struct ext2_pvt_inode))))
+ if (!e_inode || !(inode = alloc_inode(fs, inr, sizeof(struct ext2_pvt_inode))))
return NULL;
fill_inode(inode, e...