aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dst.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/dst.c')
-rw-r--r--net/core/dst.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dst.c b/net/core/dst.c
index c1674fde827d..91104d35de7d 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -166,7 +166,7 @@ EXPORT_SYMBOL(dst_discard);
166 166
167const u32 dst_default_metrics[RTAX_MAX]; 167const u32 dst_default_metrics[RTAX_MAX];
168 168
169void *dst_alloc(struct dst_ops *ops) 169void *dst_alloc(struct dst_ops *ops, int initial_ref)
170{ 170{
171 struct dst_entry *dst; 171 struct dst_entry *dst;
172 172
@@ -177,7 +177,7 @@ void *dst_alloc(struct dst_ops *ops)
177 dst = kmem_cache_zalloc(ops->kmem_cachep, GFP_ATOMIC); 177 dst = kmem_cache_zalloc(ops->kmem_cachep, GFP_ATOMIC);
178 if (!dst) 178 if (!dst)
179 return NULL; 179 return NULL;
180 atomic_set(&dst->__refcnt, 0); 180 atomic_set(&dst->__refcnt, initial_ref);
181 dst->ops = ops; 181 dst->ops = ops;
182 dst->lastuse = jiffies; 182 dst->lastuse = jiffies;
183 dst->path = dst; 183 dst->path = dst;