IB/srpt: Simplify srpt_shutdown_session()
authorBart Van Assche <bart.vanassche@sandisk.com>
Thu, 11 Feb 2016 19:05:58 +0000 (11:05 -0800)
committerDoug Ledford <dledford@redhat.com>
Mon, 29 Feb 2016 22:12:35 +0000 (17:12 -0500)
commit88936259c6a42c98e23181c9e1bba4b0bddb966a
tree94b730fd19465495d95aabff8b54997f86a3408a
parentf130c2205dba8f02372c794c6c4e6cc4906376f4
IB/srpt: Simplify srpt_shutdown_session()

The target core guarantees that shutdown_session() is only invoked
once per session. This means that the ib_srpt target driver doesn't
have to track whether or not shutdown_session() has been called.
Additionally, ensure that target_sess_cmd_list_set_waiting() is
called before target_wait_for_sess_cmds() by moving it into
srpt_release_channel_work().

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Cc: Alex Estrin <alex.estrin@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/srpt/ib_srpt.c
drivers/infiniband/ulp/srpt/ib_srpt.h