提交 e7093f0d 编写于 作者: P Petros Koutoupis 提交者: Theodore Ts'o

ext4: fixed alignment and minor code cleanup in ext4.h

Signed-off-by: NPetros Koutoupis <petros@petroskoutoupis.com>
Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
上级 22446423
...@@ -2000,7 +2000,6 @@ static inline u32 ext4_chksum(struct ext4_sb_info *sbi, u32 crc, ...@@ -2000,7 +2000,6 @@ static inline u32 ext4_chksum(struct ext4_sb_info *sbi, u32 crc,
struct shash_desc shash; struct shash_desc shash;
char ctx[4]; char ctx[4];
} desc; } desc;
int err;
BUG_ON(crypto_shash_descsize(sbi->s_chksum_driver)!=sizeof(desc.ctx)); BUG_ON(crypto_shash_descsize(sbi->s_chksum_driver)!=sizeof(desc.ctx));
...@@ -2008,8 +2007,7 @@ static inline u32 ext4_chksum(struct ext4_sb_info *sbi, u32 crc, ...@@ -2008,8 +2007,7 @@ static inline u32 ext4_chksum(struct ext4_sb_info *sbi, u32 crc,
desc.shash.flags = 0; desc.shash.flags = 0;
*(u32 *)desc.ctx = crc; *(u32 *)desc.ctx = crc;
err = crypto_shash_update(&desc.shash, address, length); BUG_ON(crypto_shash_update(&desc.shash, address, length));
BUG_ON(err);
return *(u32 *)desc.ctx; return *(u32 *)desc.ctx;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册