]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: improve function tipc_wait_for_cond()
authorTung Nguyen <tung.q.nguyen@dektech.com.au>
Tue, 19 Feb 2019 04:20:47 +0000 (11:20 +0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Feb 2019 21:58:05 +0000 (13:58 -0800)
commit0ca4e07359c13d53be04fc49e232ce83499613e4
treed846113e935508125817d023310a67eead06051e
parentd4c0db8df307fabee4a349423b4eec0f6ecdd4de
tipc: improve function tipc_wait_for_cond()

Commit f555caeb3edb ("tipc: make macro tipc_wait_for_cond() smp safe")
replaced finish_wait() with remove_wait_queue() but still used
prepare_to_wait(). This causes unnecessary conditional
checking  before adding to wait queue in prepare_to_wait().

This commit replaces prepare_to_wait() with add_wait_queue()
as the pair function with remove_wait_queue().

Acked-by: Ying Xue <ying.xue@windriver.com>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Tung Nguyen <tung.q.nguyen@dektech.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c