Skip to contentSkip to conversation

acl: Realign struct posix_acl to reduce its size by 8 bytes

PATCH In review Thorsten Blum 2 participants 4 messages Oct 4, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acl: Realign struct posix_acl to reduce its size by 8 bytes

Reduce posix_acl's struct size by 8 bytes by realigning its members.

---
 include/linux/posix_acl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/posix_acl.h +1 -1
index 83b2c5fba1d9..e2d47eb1a7f3 100644
@@ -28,8 +28,8 @@ struct posix_acl_entry {
 
 struct posix_acl {
 	refcount_t		a_refcount;
-	struct rcu_head		a_rcu;
 	unsigned int		a_count;
+	struct rcu_head		a_rcu;
 	struct posix_acl_entry	a_entries[] __counted_by(a_count);
 };
 
Signature · 1 line
2.46.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Thorsten Blum

Reduce posix_acl's struct size by 8 bytes by realigning its members.

Looks good. Feel free to add:

Honza

Quoted 21 lines
---
 include/linux/posix_acl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/posix_acl.h +1 -1
index 83b2c5fba1d9..e2d47eb1a7f3 100644
@@ -28,8 +28,8 @@ struct posix_acl_entry {
 
 struct posix_acl {
 	refcount_t		a_refcount;
-	struct rcu_head		a_rcu;
 	unsigned int		a_count;
+	struct rcu_head		a_rcu;
 	struct posix_acl_entry	a_entries[] __counted_by(a_count);
 };
 
Signature · 1 line
2.46.2
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
#2 lore raw
Quoted 8 lines · Jan Kara
Quoted 3 lines · Thorsten Blum

Reduce posix_acl's struct size by 8 bytes by realigning its members.

Looks good. Feel free to add:

We should probably add:

Fixes b0ab04a8ffd8 ("acl: Annotate struct posix_acl with __counted_by()")

as this patch is also a workaround for a Clang __bdos() bug (see the
Closes: link for details).

Thanks,
Thorsten

#3 lore raw
Quoted 8 lines · Thorsten Blum
Quoted 7 lines · Jan Kara
Quoted 3 lines · Thorsten Blum

Reduce posix_acl's struct size by 8 bytes by realigning its members.

Looks good. Feel free to add:

Quoted 7 lines
Quoted 1 line

We should probably add:

Fixes b0ab04a8ffd8 ("acl: Annotate struct posix_acl with __counted_by()")

Just realized Christian dropped b0ab04a8ffd8 (although it's still in linux-next). I guess we don't need these tags then.

Quoted 5 lines

as this patch is also a workaround for a Clang __bdos() bug (see the
Closes: link for details).

Thanks,
Thorsten