• Bart Van Assche's avatar
    IB/srp: Eliminate state SRP_TARGET_DEAD · ef6c49d8
    Bart Van Assche authored
    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: default avatarBart Van Assche <bvanassche@acm.org>
    Acked-by: default avatarDavid Dillow <dillowda@ornl.gov>
    Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
    ef6c49d8
ib_srp.c 67.1 KB