- ext4_remove_sector_t_bits_check.patch removed from -mm tree

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

 



The patch titled

     ext4: removesector_t bits check

has been removed from the -mm tree.  Its filename is

     ext4_remove_sector_t_bits_check.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: ext4: removesector_t bits check
From: Mingming Cao <cmm@xxxxxxxxxx>

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@xxxxxxxxxx>
Signed-off-by: Dave Kleikamp <shaggy@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/ext4/extents.c |   12 ++++--------
 fs/ext4/inode.c   |   10 ++++------
 2 files changed, 8 insertions(+), 14 deletions(-)

diff -puN fs/ext4/extents.c~ext4_remove_sector_t_bits_check fs/ext4/extents.c
--- a/fs/ext4/extents.c~ext4_remove_sector_t_bits_check
+++ a/fs/ext4/extents.c
@@ -53,8 +53,7 @@ static inline ext4_fsblk_t ext_pblock(st
 	ext4_fsblk_t block;
 
 	block = le32_to_cpu(ex->ee_start);
-	if (sizeof(ext4_fsblk_t) > 4)
-		block |= ((ext4_fsblk_t) le16_to_cpu(ex->ee_start_hi) << 31) << 1;
+	block |= ((ext4_fsblk_t) le16_to_cpu(ex->ee_start_hi) << 31) << 1;
 	return block;
 }
 
@@ -67,8 +66,7 @@ static inline ext4_fsblk_t idx_pblock(st
 	ext4_fsblk_t block;
 
 	block = le32_to_cpu(ix->ei_leaf);
-	if (sizeof(ext4_fsblk_t) > 4)
-		block |= ((ext4_fsblk_t) le16_to_cpu(ix->ei_leaf_hi) << 31) << 1;
+	block |= ((ext4_fsblk_t) le16_to_cpu(ix->ei_leaf_hi) << 31) << 1;
 	return block;
 }
 
@@ -80,8 +78,7 @@ static inline ext4_fsblk_t idx_pblock(st
 static inline void ext4_ext_store_pblock(struct ext4_extent *ex, ext4_fsblk_t pb)
 {
 	ex->ee_start = cpu_to_le32((unsigned long) (pb & 0xffffffff));
-	if (sizeof(ext4_fsblk_t) > 4)
-		ex->ee_start_hi = cpu_to_le16((unsigned long) ((pb >> 31) >> 1) & 0xffff);
+	ex->ee_start_hi = cpu_to_le16((unsigned long) ((pb >> 31) >> 1) & 0xffff);
 }
 
 /*
@@ -92,8 +89,7 @@ static inline void ext4_ext_store_pblock
 static inline void ext4_idx_store_pblock(struct ext4_extent_idx *ix, ext4_fsblk_t pb)
 {
 	ix->ei_leaf = cpu_to_le32((unsigned long) (pb & 0xffffffff));
-	if (sizeof(ext4_fsblk_t) > 4)
-		ix->ei_leaf_hi = cpu_to_le16((unsigned long) ((pb >> 31) >> 1) & 0xffff);
+	ix->ei_leaf_hi = cpu_to_le16((unsigned long) ((pb >> 31) >> 1) & 0xffff);
 }
 
 static int ext4_ext_check_header(const char *function, struct inode *inode,
diff -puN fs/ext4/inode.c~ext4_remove_sector_t_bits_check fs/ext4/inode.c
--- a/fs/ext4/inode.c~ext4_remove_sector_t_bits_check
+++ a/fs/ext4/inode.c
@@ -2643,9 +2643,8 @@ void ext4_read_inode(struct inode * inod
 	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
 	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);
_

Patches currently in -mm which might be from cmm@xxxxxxxxxx are

origin.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux