]> git.baikalelectronics.ru Git - kernel.git/commit
IB/srp: Eliminate state SRP_TARGET_DEAD
authorBart Van Assche <bvanassche@acm.org>
Mon, 26 Dec 2011 16:49:18 +0000 (16:49 +0000)
committerRoland Dreier <roland@purestorage.com>
Sat, 1 Dec 2012 01:40:31 +0000 (17:40 -0800)
commit1e1019a9d94ee0a929193acd69775217366e3bec
treec1348935f77b750c3f82caa847db6c944aeb4961
parentcdf8f7ddd46d7a1a2ff90517642e5e5cdfe0b0a0
IB/srp: Eliminate state SRP_TARGET_DEAD

Only queue removal work after having changed the target state
into SRP_TARGET_REMOVED and not if that state was already equal
to SRP_TARGET_REMOVED.  That allows us to remove the state
SRP_TARGET_DEAD.  Add a call to srp_disconnect_target() in
srp_remove_target() -- due to previous changes it is now safe to
invoke that function even if the IB connection has already
been disconnected.  This change allows us to replace the target
removal code in srp_remove_one() by an (indirect) call to
srp_remove_target().  Rename srp_target_port.work into
srp_target_port.remove_work to reflect its usage.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: David Dillow <dillowda@ornl.gov>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/srp/ib_srp.c
drivers/infiniband/ulp/srp/ib_srp.h