]> git.karo-electronics.de Git - karo-tx-linux.git/commit
target: Drop se_lun->lun_active for existing percpu lun_ref
authorNicholas Bellinger <nab@linux-iscsi.org>
Thu, 21 May 2015 04:21:08 +0000 (21:21 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Mon, 1 Jun 2015 07:27:56 +0000 (00:27 -0700)
commit9e37d042cfcb003b885bb4c531cd6f07f62647d1
tree8f198eb93f269c0ebe7a69b018293e2814316aee
parent4cc987eaff9144182cde88d6d132420c28d3f81b
target: Drop se_lun->lun_active for existing percpu lun_ref

With se_port_t and t10_alua_tg_pt_gp_member being absored into se_lun,
there is no need for an extra atomic_t based reference count for PR
ALL_TG_PT=1 and ALUA access state transition.

Go ahead and use the existing percpu se_lun->lun_ref instead, and
convert the two special cases to percpu_ref_tryget_live() to avoid
se_lun if transport_clear_lun_ref() has already been invoked to
shutdown the se_lun.

Cc: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_alua.c
drivers/target/target_core_pr.c
drivers/target/target_core_tpg.c
include/target/target_core_base.h