1 ext4: fixed alignment and minor code cleanup in ext4.h
3 From: Petros Koutoupis <petros@petroskoutoupis.com>
5 Signed-off-by: Petros Koutoupis <petros@petroskoutoupis.com>
6 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 diff -uNpr linux-4.15-rc4.orig/fs/ext4/ext4.h linux-4.15-rc4/fs/ext4/ext4.h
9 --- linux-4.15-rc4.orig/fs/ext4/ext4.h 2017-12-18 08:35:04.000000000 -0600
10 +++ linux-4.15-rc4/fs/ext4/ext4.h 2017-12-18 08:37:02.000000000 -0600
11 @@ -611,10 +611,10 @@ enum {
13 * Flags used by ext4_free_blocks
15 -#define EXT4_FREE_BLOCKS_METADATA 0x0001
16 -#define EXT4_FREE_BLOCKS_FORGET 0x0002
17 -#define EXT4_FREE_BLOCKS_VALIDATED 0x0004
18 -#define EXT4_FREE_BLOCKS_NO_QUOT_UPDATE 0x0008
19 +#define EXT4_FREE_BLOCKS_METADATA 0x0001
20 +#define EXT4_FREE_BLOCKS_FORGET 0x0002
21 +#define EXT4_FREE_BLOCKS_VALIDATED 0x0004
22 +#define EXT4_FREE_BLOCKS_NO_QUOT_UPDATE 0x0008
23 #define EXT4_FREE_BLOCKS_NOFREE_FIRST_CLUSTER 0x0010
24 #define EXT4_FREE_BLOCKS_NOFREE_LAST_CLUSTER 0x0020
26 @@ -1986,10 +1986,10 @@ static inline __le16 ext4_rec_len_to_dis
28 /* Legal values for the dx_root hash_version field: */
30 -#define DX_HASH_LEGACY 0
31 -#define DX_HASH_HALF_MD4 1
32 -#define DX_HASH_TEA 2
33 -#define DX_HASH_LEGACY_UNSIGNED 3
34 +#define DX_HASH_LEGACY 0
35 +#define DX_HASH_HALF_MD4 1
36 +#define DX_HASH_TEA 2
37 +#define DX_HASH_LEGACY_UNSIGNED 3
38 #define DX_HASH_HALF_MD4_UNSIGNED 4
39 #define DX_HASH_TEA_UNSIGNED 5
41 @@ -2000,7 +2000,6 @@ static inline u32 ext4_chksum(struct ext
42 struct shash_desc shash;
47 BUG_ON(crypto_shash_descsize(sbi->s_chksum_driver)!=sizeof(desc.ctx));
49 @@ -2008,8 +2007,7 @@ static inline u32 ext4_chksum(struct ext
51 *(u32 *)desc.ctx = crc;
53 - err = crypto_shash_update(&desc.shash, address, length);
55 + BUG_ON(crypto_shash_update(&desc.shash, address, length));
57 return *(u32 *)desc.ctx;