Query about ext2_alloc_inode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I want to use 'l_i_reserved2' field of ext2_inode for my purpose. I
need to initialise this field when a new inode is created. I traced
sys_create call and found that 'alloc_inode' from 'struct
super_operations' is called for new inode[correct me here]. But looks
like there is no way one can access raw inode[ext2_inode] from
alloc_inode.

Is it possible to initialise 'l_i_reserved2' in alloc_inode ? What
could be other way to do it ?

 static struct inode *ext2_alloc_inode(struct super_block *sb)
 {
 struct ext2_inode_info *ei;
 ei = (struct ext2_inode_info *)kmem_cache_alloc(ext2_inode_cachep, GFP_KERNEL);
 if (!ei)
 return NULL;
 #ifdef CONFIG_EXT2_FS_POSIX_ACL
 ei->i_acl = EXT2_ACL_NOT_CACHED;
 ei->i_default_acl = EXT2_ACL_NOT_CACHED;
 #endif
 ei->vfs_inode.i_version = 1;
 }

LXR link for ext2_alloc_inode:
http://lxr.linux.no/linux/fs/ext2/super.c#L141

Thanks.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux