Thread (24 messages) 24 messages, 2 authors, 2017-11-01

Re: [RFC v2 PATCH 04/11] net: Create and use new helper xfrm_dst_child().

From: David Miller <davem@davemloft.net>
Date: 2017-11-01 02:07:40

From: Eric Dumazet <redacted>
Date: Tue, 31 Oct 2017 11:39:22 -0700
On Tue, 2017-10-31 at 23:10 +0900, David S. Miller wrote:
quoted
@@ -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).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help