Skip to content

Commit 851bdd1

Browse files
JinXiao-Inteldavem330
authored andcommitted
inetpeer_gc_worker: trivial cleanup
Do not initialize list twice. list_replace_init() already takes care of initializing list. We don't need to initialize it with LIST_HEAD() beforehand. Signed-off-by: xiao jin <[email protected]> Reviewed-by: David Cohen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1818ce4 commit 851bdd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/inetpeer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ int inet_peer_maxttl __read_mostly = 10 * 60 * HZ; /* usual time to live: 10 min
120120
static void inetpeer_gc_worker(struct work_struct *work)
121121
{
122122
struct inet_peer *p, *n, *c;
123-
LIST_HEAD(list);
123+
struct list_head list;
124124

125125
spin_lock_bh(&gc_lock);
126126
list_replace_init(&gc_list, &list);

0 commit comments

Comments
 (0)