Răsfoiți Sursa

tipc: Eliminate unnecessary locking when starting topology service

Modifies the initialization code for TIPC's topology service to
avoid taking the spinlock protecting the subscriber list, since
there is no need to do this.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Allan Stephens 14 ani în urmă
părinte
comite
9f54b545bd
1 a modificat fișierele cu 0 adăugiri și 3 ștergeri
  1. 0 3
      net/tipc/subscr.c

+ 0 - 3
net/tipc/subscr.c

@@ -542,7 +542,6 @@ int tipc_subscr_start(void)
 	spin_lock_init(&topsrv.lock);
 	spin_lock_init(&topsrv.lock);
 	INIT_LIST_HEAD(&topsrv.subscriber_list);
 	INIT_LIST_HEAD(&topsrv.subscriber_list);
 
 
-	spin_lock_bh(&topsrv.lock);
 	res = tipc_createport(NULL,
 	res = tipc_createport(NULL,
 			      TIPC_CRITICAL_IMPORTANCE,
 			      TIPC_CRITICAL_IMPORTANCE,
 			      NULL,
 			      NULL,
@@ -563,12 +562,10 @@ int tipc_subscr_start(void)
 		goto failed;
 		goto failed;
 	}
 	}
 
 
-	spin_unlock_bh(&topsrv.lock);
 	return 0;
 	return 0;
 
 
 failed:
 failed:
 	err("Failed to create subscription service\n");
 	err("Failed to create subscription service\n");
-	spin_unlock_bh(&topsrv.lock);
 	return res;
 	return res;
 }
 }