diff options
author | Theodore Ts'o <tytso@mit.edu> | 2012-07-22 20:25:31 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-07-22 20:25:31 -0400 |
commit | 3108b54bcedde5d952c90460df5bc21efc1e134f (patch) | |
tree | 7adb071d689b93960069666f8d03bbafb629b93c /fs/ext4 | |
parent | 8a9918497bcf5aaa8d45eb61c373605bc4e8c81f (diff) |
ext4: remove dynamic array size in ext4_chksum()
The ext4_checksum() inline function was using a dynamic array size,
which is not legal C. (It is a gcc extension).
Remove it.
Cc: "Darrick J. Wong" <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/ext4.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 1610e808ebe3..e8e8afa402f1 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h | |||
@@ -1667,10 +1667,12 @@ static inline u32 ext4_chksum(struct ext4_sb_info *sbi, u32 crc, | |||
1667 | { | 1667 | { |
1668 | struct { | 1668 | struct { |
1669 | struct shash_desc shash; | 1669 | struct shash_desc shash; |
1670 | char ctx[crypto_shash_descsize(sbi->s_chksum_driver)]; | 1670 | char ctx[4]; |
1671 | } desc; | 1671 | } desc; |
1672 | int err; | 1672 | int err; |
1673 | 1673 | ||
1674 | BUG_ON(crypto_shash_descsize(sbi->s_chksum_driver)!=sizeof(desc.ctx)); | ||
1675 | |||
1674 | desc.shash.tfm = sbi->s_chksum_driver; | 1676 | desc.shash.tfm = sbi->s_chksum_driver; |
1675 | desc.shash.flags = 0; | 1677 | desc.shash.flags = 0; |
1676 | *(u32 *)desc.ctx = crc; | 1678 | *(u32 *)desc.ctx = crc; |