Skip to content

Commit bd29881

Browse files
LiBaokun96tytso
authored andcommitted
ext4: pack holes in ext4_inode_info
When CONFIG_DEBUG_SPINLOCK is not enabled (general case), there are four 4 bytes holes and one 2 bytes hole in struct ext4_inode_info. Move the members to pack the four 4 bytes holes. Signed-off-by: Baokun Li <[email protected]> Reviewed-by: Jan Kara <[email protected]> Reviewed-by: Zhang Yi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent 5a1cd0e commit bd29881

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

fs/ext4/ext4.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,8 @@ struct ext4_inode_info {
10641064
/* Number of ongoing updates on this inode */
10651065
atomic_t i_fc_updates;
10661066

1067+
spinlock_t i_raw_lock; /* protects updates to the raw inode */
1068+
10671069
/* Fast commit wait queue for this inode */
10681070
wait_queue_head_t i_fc_wait;
10691071

@@ -1101,8 +1103,6 @@ struct ext4_inode_info {
11011103
struct inode vfs_inode;
11021104
struct jbd2_inode *jinode;
11031105

1104-
spinlock_t i_raw_lock; /* protects updates to the raw inode */
1105-
11061106
/*
11071107
* File creation time. Its function is same as that of
11081108
* struct timespec64 i_{a,c,m}time in the generic inode.
@@ -1145,6 +1145,7 @@ struct ext4_inode_info {
11451145
/* quota space reservation, managed internally by quota code */
11461146
qsize_t i_reserved_quota;
11471147
#endif
1148+
spinlock_t i_block_reservation_lock;
11481149

11491150
/* Lock protecting lists below */
11501151
spinlock_t i_completed_io_lock;
@@ -1155,8 +1156,6 @@ struct ext4_inode_info {
11551156
struct list_head i_rsv_conversion_list;
11561157
struct work_struct i_rsv_conversion_work;
11571158

1158-
spinlock_t i_block_reservation_lock;
1159-
11601159
/*
11611160
* Transactions that contain inode's metadata needed to complete
11621161
* fsync and fdatasync, respectively.

0 commit comments

Comments
 (0)