* [PATCH] acl: Realign struct posix_acl to reduce its size by 8 bytes
@ 2024-10-04 10:33 Thorsten Blum
2024-10-04 13:37 ` Jan Kara
0 siblings, 1 reply; 4+ messages in thread
From: Thorsten Blum @ 2024-10-04 10:33 UTC (permalink / raw)
To: Thorsten Blum, Christian Brauner, Jan Kara; +Cc: linux-kernel
Reduce posix_acl's struct size by 8 bytes by realigning its members.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
include/linux/posix_acl.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h
index 83b2c5fba1d9..e2d47eb1a7f3 100644
--- a/include/linux/posix_acl.h
+++ b/include/linux/posix_acl.h
@@ -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);
};
--
2.46.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] acl: Realign struct posix_acl to reduce its size by 8 bytes
2024-10-04 10:33 [PATCH] acl: Realign struct posix_acl to reduce its size by 8 bytes Thorsten Blum
@ 2024-10-04 13:37 ` Jan Kara
2024-10-04 20:11 ` Thorsten Blum
0 siblings, 1 reply; 4+ messages in thread
From: Jan Kara @ 2024-10-04 13:37 UTC (permalink / raw)
To: Thorsten Blum; +Cc: Christian Brauner, Jan Kara, linux-kernel
On Fri 04-10-24 12:33:57, Thorsten Blum wrote:
> Reduce posix_acl's struct size by 8 bytes by realigning its members.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Looks good. Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> include/linux/posix_acl.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h
> index 83b2c5fba1d9..e2d47eb1a7f3 100644
> --- a/include/linux/posix_acl.h
> +++ b/include/linux/posix_acl.h
> @@ -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);
> };
>
> --
> 2.46.2
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] acl: Realign struct posix_acl to reduce its size by 8 bytes
2024-10-04 13:37 ` Jan Kara
@ 2024-10-04 20:11 ` Thorsten Blum
2024-10-04 21:12 ` Thorsten Blum
0 siblings, 1 reply; 4+ messages in thread
From: Thorsten Blum @ 2024-10-04 20:11 UTC (permalink / raw)
To: Jan Kara; +Cc: Christian Brauner, linux-kernel
On 4. Oct 2024, at 15:37, Jan Kara wrote:
> On Fri 04-10-24 12:33:57, Thorsten Blum wrote:
>> Reduce posix_acl's struct size by 8 bytes by realigning its members.
>>
>> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
>
> Looks good. Feel free to add:
>
> Reviewed-by: Jan Kara <jack@suse.cz>
We should probably add:
Fixes: b0ab04a8ffd8 ("acl: Annotate struct posix_acl with __counted_by()")
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202409260949.a1254989-oliver.sang@intel.com
as this patch is also a workaround for a Clang __bdos() bug (see the
Closes: link for details).
Thanks,
Thorsten
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] acl: Realign struct posix_acl to reduce its size by 8 bytes
2024-10-04 20:11 ` Thorsten Blum
@ 2024-10-04 21:12 ` Thorsten Blum
0 siblings, 0 replies; 4+ messages in thread
From: Thorsten Blum @ 2024-10-04 21:12 UTC (permalink / raw)
To: Jan Kara; +Cc: Christian Brauner, linux-kernel
On 4. Oct 2024, at 22:11, Thorsten Blum wrote:
> On 4. Oct 2024, at 15:37, Jan Kara wrote:
>> On Fri 04-10-24 12:33:57, Thorsten Blum wrote:
>>> Reduce posix_acl's struct size by 8 bytes by realigning its members.
>>>
>>> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
>>
>> Looks good. Feel free to add:
>>
>> Reviewed-by: Jan Kara <jack@suse.cz>
>
> We should probably add:
>
> Fixes: b0ab04a8ffd8 ("acl: Annotate struct posix_acl with __counted_by()")
> Reported-by: kernel test robot <oliver.sang@intel.com>
> Closes: https://lore.kernel.org/oe-lkp/202409260949.a1254989-oliver.sang@intel.com
Just realized Christian dropped b0ab04a8ffd8 (although it's still in
linux-next). I guess we don't need these tags then.
> as this patch is also a workaround for a Clang __bdos() bug (see the
> Closes: link for details).
>
> Thanks,
> Thorsten
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-04 21:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-04 10:33 [PATCH] acl: Realign struct posix_acl to reduce its size by 8 bytes Thorsten Blum
2024-10-04 13:37 ` Jan Kara
2024-10-04 20:11 ` Thorsten Blum
2024-10-04 21:12 ` Thorsten Blum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox