Skip to content

Commit c958396

Browse files
Alexey Dobriyandavem330
authored andcommitted
xfrm: initialise xfrm_policy_gc_work statically
Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 46a8494 commit c958396

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net/xfrm/xfrm_policy.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ static struct xfrm_policy_afinfo *xfrm_policy_afinfo[NPROTO];
5555

5656
static struct kmem_cache *xfrm_dst_cache __read_mostly;
5757

58-
static struct work_struct xfrm_policy_gc_work;
5958
static HLIST_HEAD(xfrm_policy_gc_list);
6059
static DEFINE_SPINLOCK(xfrm_policy_gc_lock);
6160

@@ -296,6 +295,7 @@ static void xfrm_policy_gc_task(struct work_struct *work)
296295
hlist_for_each_entry_safe(policy, entry, tmp, &gc_list, bydst)
297296
xfrm_policy_gc_kill(policy);
298297
}
298+
static DECLARE_WORK(xfrm_policy_gc_work, xfrm_policy_gc_task);
299299

300300
/* Rule must be locked. Release descentant resources, announce
301301
* entry dead. The rule must be unlinked from lists to the moment.
@@ -2425,7 +2425,6 @@ static void __init xfrm_policy_init(void)
24252425
}
24262426

24272427
INIT_LIST_HEAD(&xfrm_policy_all);
2428-
INIT_WORK(&xfrm_policy_gc_work, xfrm_policy_gc_task);
24292428
register_netdevice_notifier(&xfrm_dev_notifier);
24302429
}
24312430

0 commit comments

Comments
 (0)