ext4: dynamically allocate the jbd2_inode in ext4_inode_info as necessary
Replace the jbd2_inode structure (which is 48 bytes) with a pointer and only allocate the jbd2_inode when it is needed --- that is, when the file system has a journal present and the inode has been opened for writing. This allows us to further slim down the ext4_inode_info structure. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
@ -253,7 +253,7 @@ static inline int ext4_journal_force_commit(journal_t *journal)
|
||||
static inline int ext4_jbd2_file_inode(handle_t *handle, struct inode *inode)
|
||||
{
|
||||
if (ext4_handle_valid(handle))
|
||||
return jbd2_journal_file_inode(handle, &EXT4_I(inode)->jinode);
|
||||
return jbd2_journal_file_inode(handle, EXT4_I(inode)->jinode);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user