diff options
author | Theodore Ts'o <tytso@mit.edu> | 2013-04-09 23:59:55 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2013-04-09 23:59:55 -0400 |
commit | d6a771056b32146da1280f7872f6936b0c7770ea (patch) | |
tree | eba9b67756519315758b51e1021c65ccb1874da5 /fs/ext4/xattr.c | |
parent | 171a7f21a76a0958c225b97c00a97a10390d40ee (diff) |
ext4: fix miscellaneous big endian warnings
None of these result in any bug, but they makes sparse complain.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/xattr.c')
-rw-r--r-- | fs/ext4/xattr.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 3a120b277240..c081e34f717f 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c | |||
@@ -122,17 +122,18 @@ static __le32 ext4_xattr_block_csum(struct inode *inode, | |||
122 | struct ext4_xattr_header *hdr) | 122 | struct ext4_xattr_header *hdr) |
123 | { | 123 | { |
124 | struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); | 124 | struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); |
125 | __u32 csum, old; | 125 | __u32 csum; |
126 | __le32 save_csum; | ||
127 | __le64 dsk_block_nr = cpu_to_le64(block_nr); | ||
126 | 128 | ||
127 | old = hdr->h_checksum; | 129 | save_csum = hdr->h_checksum; |
128 | hdr->h_checksum = 0; | 130 | hdr->h_checksum = 0; |
129 | block_nr = cpu_to_le64(block_nr); | 131 | csum = ext4_chksum(sbi, sbi->s_csum_seed, (__u8 *)&dsk_block_nr, |
130 | csum = ext4_chksum(sbi, sbi->s_csum_seed, (__u8 *)&block_nr, | 132 | sizeof(dsk_block_nr)); |
131 | sizeof(block_nr)); | ||
132 | csum = ext4_chksum(sbi, csum, (__u8 *)hdr, | 133 | csum = ext4_chksum(sbi, csum, (__u8 *)hdr, |
133 | EXT4_BLOCK_SIZE(inode->i_sb)); | 134 | EXT4_BLOCK_SIZE(inode->i_sb)); |
134 | 135 | ||
135 | hdr->h_checksum = old; | 136 | hdr->h_checksum = save_csum; |
136 | return cpu_to_le32(csum); | 137 | return cpu_to_le32(csum); |
137 | } | 138 | } |
138 | 139 | ||