From: Julia Lawall Date: Wed, 9 Jan 2008 07:48:20 +0000 (-0800) Subject: [TIPC]: Use tipc_port_unlock X-Git-Tag: v2.6.25-rc1~1162^2~837 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cec72c890d3a465eed08c24a4a2bfe25650318f;p=pandora-kernel.git [TIPC]: Use tipc_port_unlock The file net/tipc/port.c takes a lock using the function tipc_port_lock and then releases the lock sometimes using tipc_port_unlock and sometimes using spin_unlock_bh(p_ptr->publ.lock). tipc_port_unlock simply does the spin_unlock_bh, but it seems cleaner to use it everywhere. The problem was fixed using the following semantic patch. (http://www.emn.fr/x-info/coccinelle/) // @@ struct port *p_ptr; @@ p_ptr = tipc_port_lock(...) ... ( p_ptr = tipc_port_lock(...); | ?- spin_unlock_bh(p_ptr->publ.lock); + tipc_port_unlock(p_ptr); ) // Signed-off-by: Julia Lawall Acked-by: Jon Paul Maloy Signed-off-by: David S. Miller --- Reading git-diff-tree failed