aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorBaokun Li <libaokun1@huawei.com>2025-01-22 19:05:33 +0800
committerTheodore Ts'o <tytso@mit.edu>2025-03-13 10:08:09 -0400
commitbd29881aff6db23f0acde1a6c28c19017fd3115a (patch)
tree4c9705fd0ccf007f8a7ca778d2e186e2603d5ccb
parentext4: remove unused member 'i_unwritten' from 'ext4_inode_info' (diff)
downloadwireguard-linux-bd29881aff6db23f0acde1a6c28c19017fd3115a.tar.xz
wireguard-linux-bd29881aff6db23f0acde1a6c28c19017fd3115a.zip
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 <libaokun1@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Zhang Yi <yi.zhang@huawei.com> Link: https://patch.msgid.link/20250122110533.4116662-10-libaokun@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--fs/ext4/ext4.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 1a1f0df49995..8c5e82433909 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1064,6 +1064,8 @@ struct ext4_inode_info {
/* Number of ongoing updates on this inode */
atomic_t i_fc_updates;
+ spinlock_t i_raw_lock; /* protects updates to the raw inode */
+
/* Fast commit wait queue for this inode */
wait_queue_head_t i_fc_wait;
@@ -1101,8 +1103,6 @@ struct ext4_inode_info {
struct inode vfs_inode;
struct jbd2_inode *jinode;
- spinlock_t i_raw_lock; /* protects updates to the raw inode */
-
/*
* File creation time. Its function is same as that of
* struct timespec64 i_{a,c,m}time in the generic inode.
@@ -1145,6 +1145,7 @@ struct ext4_inode_info {
/* quota space reservation, managed internally by quota code */
qsize_t i_reserved_quota;
#endif
+ spinlock_t i_block_reservation_lock;
/* Lock protecting lists below */
spinlock_t i_completed_io_lock;
@@ -1155,8 +1156,6 @@ struct ext4_inode_info {
struct list_head i_rsv_conversion_list;
struct work_struct i_rsv_conversion_work;
- spinlock_t i_block_reservation_lock;
-
/*
* Transactions that contain inode's metadata needed to complete
* fsync and fdatasync, respectively.