[PATCH] ext4: removesector_t bits check
Previously when in-kernel ext4 block type is sector_t, it's only 4 bits long under some 32bit arch (when CONFIG_LBD is not on). So we need to check the size of sector_t before we read 48bit long on-disk blocks to in-kernel blocks. These checks are unnecessary now as we changed the in-kernel blocks to unsigned longlong. Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
2ae0210760
commit
9b8f1f0106
@ -2643,9 +2643,8 @@ void ext4_read_inode(struct inode * inode)
|
||||
ei->i_frag_size = raw_inode->i_fsize;
|
||||
#endif
|
||||
ei->i_file_acl = le32_to_cpu(raw_inode->i_file_acl);
|
||||
if ((sizeof(sector_t) > 4) &&
|
||||
(EXT4_SB(inode->i_sb)->s_es->s_creator_os !=
|
||||
cpu_to_le32(EXT4_OS_HURD)))
|
||||
if (EXT4_SB(inode->i_sb)->s_es->s_creator_os !=
|
||||
cpu_to_le32(EXT4_OS_HURD))
|
||||
ei->i_file_acl |=
|
||||
((__u64)le16_to_cpu(raw_inode->i_file_acl_high)) << 32;
|
||||
if (!S_ISREG(inode->i_mode)) {
|
||||
@ -2781,9 +2780,8 @@ static int ext4_do_update_inode(handle_t *handle,
|
||||
raw_inode->i_frag = ei->i_frag_no;
|
||||
raw_inode->i_fsize = ei->i_frag_size;
|
||||
#endif
|
||||
if ((sizeof(sector_t) > 4) &&
|
||||
(EXT4_SB(inode->i_sb)->s_es->s_creator_os !=
|
||||
cpu_to_le32(EXT4_OS_HURD)))
|
||||
if (EXT4_SB(inode->i_sb)->s_es->s_creator_os !=
|
||||
cpu_to_le32(EXT4_OS_HURD))
|
||||
raw_inode->i_file_acl_high =
|
||||
cpu_to_le16(ei->i_file_acl >> 32);
|
||||
raw_inode->i_file_acl = cpu_to_le32(ei->i_file_acl);
|
||||
|
Reference in New Issue
Block a user