Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 851bdd11 authored by xiao jin's avatar xiao jin Committed by David S. Miller
Browse files

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: default avatarxiao jin <jin.xiao@intel.com>
Reviewed-by: default avatarDavid Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1818ce4d
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -120,7 +120,7 @@ int inet_peer_maxttl __read_mostly = 10 * 60 * HZ; /* usual time to live: 10 min
static void inetpeer_gc_worker(struct work_struct *work)
static void inetpeer_gc_worker(struct work_struct *work)
{
{
	struct inet_peer *p, *n, *c;
	struct inet_peer *p, *n, *c;
	LIST_HEAD(list);
	struct list_head list;


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