From: Nicholas Bellinger Date: Thu, 17 Sep 2015 03:23:53 +0000 (-0700) Subject: target: Make TCM_WRITE_PROTECT failure honor D_SENSE bit X-Git-Tag: omap-for-v4.3/fixes-rc5~78^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fa3a867486f85df66eba8c4df85804d3309c6ad;p=pandora-kernel.git target: Make TCM_WRITE_PROTECT failure honor D_SENSE bit This patch changes transport_lookup_cmd_lun() to obtain se_lun->lun_ref + se_cmd->se_device rcu_dereference during TCM_WRITE_PROTECT -> CHECK_CONDITION failure status. Do this to ensure the active control D_SENSE mode page bit is being honored. Reported-by: Sagi Grimberg Reviewed-by: Sagi Grimberg Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed