Skip to content

Commit 1996250

Browse files
ebiggerstytso
authored andcommitted
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 <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Jan Kara <jack@suse.cz>
1 parent fb44543 commit 1996250

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/ext4/xattr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ __xattr_check_inode(struct inode *inode, struct ext4_xattr_ibody_header *header,
241241
int error = -EFSCORRUPTED;
242242

243243
if (((void *) header >= end) ||
244-
(header->h_magic != le32_to_cpu(EXT4_XATTR_MAGIC)))
244+
(header->h_magic != cpu_to_le32(EXT4_XATTR_MAGIC)))
245245
goto errout;
246246
error = ext4_xattr_check_names(entry, end, entry);
247247
errout:

0 commit comments

Comments
 (0)