[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpU=S=e3e5-TjLFLVVwTwuQeu8m6Mi=TPSSrjt25ceBRCw@mail.gmail.com>
Date: Thu, 1 Dec 2016 21:42:23 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: Alexey Dobriyan <adobriyan@...il.com>
Cc: David Miller <davem@...emloft.net>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
Pavel Emelyanov <xemul@...nvz.org>
Subject: Re: [PATCH 2/3] netns: add dummy struct inside "struct net_generic"
On Thu, Dec 1, 2016 at 5:12 PM, Alexey Dobriyan <adobriyan@...il.com> wrote:
> struct net_generic {
> - unsigned int len;
> - struct rcu_head rcu;
> + struct {
> + unsigned int len;
> + struct rcu_head rcu;
> + } s;
>
> void *ptr[0];
> };
I think you can put them in a union, since rcu is only used
for kfree_rcu() where len is not needed and rcu_head doesn't
need to be initialized by callers.
Powered by blists - more mailing lists