[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20171101.110735.291520563960209347.davem@davemloft.net>
Date: Wed, 01 Nov 2017 11:07:35 +0900 (KST)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: netdev@...r.kernel.org
Subject: Re: [RFC v2 PATCH 04/11] net: Create and use new helper
xfrm_dst_child().
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Tue, 31 Oct 2017 11:39:22 -0700
> On Tue, 2017-10-31 at 23:10 +0900, David S. Miller wrote:
>> @@ -116,12 +116,14 @@ EXPORT_SYMBOL(dst_alloc);
>>
>> struct dst_entry *dst_destroy(struct dst_entry * dst)
>> {
>> - struct dst_entry *child;
>> + struct dst_entry *child = NULL;
>>
>> smp_rmb();
>>
>> - child = dst->child;
>> -
>> +#ifdef CONFIG_XFRM
>> + if (dst->xfrm)
>> + child = dst->child;
>> +#endif
>
>
> Why not using here :
>
> child = xfrm_dst_child(dst);
>
> This avoid the #ifdef and uses the new helper quite well.
Yep, that makes a lot of sense, thanks for the review(s).
Powered by blists - more mailing lists