netconsole: remove unnecessary netconsole_target_get/out() from write_msg()
authorTejun Heo <[email protected]>
Thu, 25 Jun 2015 22:01:33 +0000 (15:01 -0700)
committerLinus Torvalds <[email protected]>
Fri, 26 Jun 2015 00:00:39 +0000 (17:00 -0700)
commita6d403ac96893cb5c5812c2d75de082795f02e5f
tree4a8e7dfdcc89e8ea4025ad13aeacd7b92bbd6c25
parent6fe29354befe4c46eb308b662155d4d8017358e1
netconsole: remove unnecessary netconsole_target_get/out() from write_msg()

write_msg() grabs target_list_lock and walks target_list invoking
netpool_send_udp() on each target.  Curiously, it protects each iteration
with netconsole_target_get/put() even though it never releases
target_list_lock which protects all the members.

While this doesn't harm anything, it doesn't serve any purpose either.
The items on the list can't go away while target_list_lock is held.
Remove the unnecessary get/put pair.

Signed-off-by: Tejun Heo <[email protected]>
Cc: David Miller <[email protected]>
Cc: Kay Sievers <[email protected]>
Cc: Petr Mladek <[email protected]>
Cc: Tetsuo Handa <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/net/netconsole.c