ext4: correct endianness conversion in __xattr_check_inode()
PATCH 1/1 ext4: correct endianness conversion in __xattr_check_inode()
It should be cpu_to_le32(), not le32_to_cpu(). No change in behavior.
Found with sparse, and this was the only endianness warning in fs/ext4/.
Signed-off-by Eric Biggers <[email protected]>
--- fs/ext4/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/xattr.c +1 -1
@@ -241,7 +241,7 @@ __xattr_check_inode(struct inode *inode, struct ext4_xattr_ibody_header *header,int error = -EFSCORRUPTED ;if (((void *) header >= end) || - (header->h_magic !=le32_to_cpu (EXT4_XATTR_MAGIC ))) + (header->h_magic !=cpu_to_le32 (EXT4_XATTR_MAGIC ))) goto errout; error =ext4_xattr_check_names (entry, end, entry); errout:
Signature · 1 line
2.8.0.rc3.226.g39d4020
Quoted 5 lines · Eric Biggers
It should be
cpu_to_le32(), notle32_to_cpu(). No change in behavior.Found with sparse, and this was the only endianness warning in
fs/ext4/.Signed-off-by Eric Biggers <[email protected]>
Looks good. You can add:
Reviewed-by Jan Kara <[email protected]>
Honza
Quoted 24 lines
--- fs/ext4/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/ext4/xattr.c +1
-1@@ -241,7 +241,7 @@ __xattr_check_inode(struct inode *inode, struct ext4_xattr_ibody_header *header,int error = -EFSCORRUPTED ;if (((void *) header >= end) || - (header->h_magic !=le32_to_cpu (EXT4_XATTR_MAGIC ))) + (header->h_magic !=cpu_to_le32 (EXT4_XATTR_MAGIC ))) goto errout; error =ext4_xattr_check_names (entry, end, entry); errout:Signature · 6 lines
2.8.0.rc3.226.g39d4020 -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Quoted 10 lines · Jan Kara
Quoted 5 lines · Eric Biggers
It should be
cpu_to_le32(), notle32_to_cpu(). No change in behavior.Found with sparse, and this was the only endianness warning in
fs/ext4/.Signed-off-by Eric Biggers <[email protected]>Looks good. You can add:
Reviewed-by Jan Kara <[email protected]>
Thanks, applied
- Ted