aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorMingming Cao <cmm@us.ibm.com>2006-10-11 04:21:13 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-11 14:14:18 -0400
commit9b8f1f0106ab39ad58765d4e7c57189835f51127 (patch)
tree7f853ec30e4edc57f8b0c82db52b20a5beb75c38 /fs/ext4/inode.c
parent2ae0210760aed9d626eaede5b63db95e198f7c8e (diff)
[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>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 99b82b52b5f0..c05dc57148bb 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2643,9 +2643,8 @@ void ext4_read_inode(struct inode * inode)
2643 ei->i_frag_size = raw_inode->i_fsize; 2643 ei->i_frag_size = raw_inode->i_fsize;
2644#endif 2644#endif
2645 ei->i_file_acl = le32_to_cpu(raw_inode->i_file_acl); 2645 ei->i_file_acl = le32_to_cpu(raw_inode->i_file_acl);
2646 if ((sizeof(sector_t) > 4) && 2646 if (EXT4_SB(inode->i_sb)->s_es->s_creator_os !=
2647 (EXT4_SB(inode->i_sb)->s_es->s_creator_os != 2647 cpu_to_le32(EXT4_OS_HURD))
2648 cpu_to_le32(EXT4_OS_HURD)))
2649 ei->i_file_acl |= 2648 ei->i_file_acl |=
2650 ((__u64)le16_to_cpu(raw_inode->i_file_acl_high)) << 32; 2649 ((__u64)le16_to_cpu(raw_inode->i_file_acl_high)) << 32;
2651 if (!S_ISREG(inode->i_mode)) { 2650 if (!S_ISREG(inode->i_mode)) {
@@ -2781,9 +2780,8 @@ static int ext4_do_update_inode(handle_t *handle,
2781 raw_inode->i_frag = ei->i_frag_no; 2780 raw_inode->i_frag = ei->i_frag_no;
2782 raw_inode->i_fsize = ei->i_frag_size; 2781 raw_inode->i_fsize = ei->i_frag_size;
2783#endif 2782#endif
2784 if ((sizeof(sector_t) > 4) && 2783 if (EXT4_SB(inode->i_sb)->s_es->s_creator_os !=
2785 (EXT4_SB(inode->i_sb)->s_es->s_creator_os != 2784 cpu_to_le32(EXT4_OS_HURD))
2786 cpu_to_le32(EXT4_OS_HURD)))
2787 raw_inode->i_file_acl_high = 2785 raw_inode->i_file_acl_high =
2788 cpu_to_le16(ei->i_file_acl >> 32); 2786 cpu_to_le16(ei->i_file_acl >> 32);
2789 raw_inode->i_file_acl = cpu_to_le32(ei->i_file_acl); 2787 raw_inode->i_file_acl = cpu_to_le32(ei->i_file_acl);